Add build script for Swift.

This commit is contained in:
krahets
2023-02-08 20:30:05 +08:00
parent 05f0054005
commit 38751cc5f5
25 changed files with 128 additions and 1223 deletions

View File

@ -1,5 +1,5 @@
"""
File: extract_code_python.py
File: extract_code_jsts.py
Created Time: 2023-02-07
Author: Krahets (krahets@163.com)
"""
@ -17,10 +17,10 @@ class ExtractCodeBlocksJSTS(ExtractCodeBlocksJava):
# Pattern to match function names and class names
self.func_pattern = r'(\s*)(function|private|public|)\s*(\S*)\(.*\)(:|)\s*(.*)\s+{\s*\n'
self.class_pattern = r'class\s+(\w+)\s*\{'
self.class_pattern = r'(public|)\s*class\s+(\w+)\s*\{'
self.func_pattern_keys = ["total", "ind", "prefix", "label", ":", "return"]
self.class_pattern_keys = ["total", "label"]
self.class_pattern_keys = ["total", "scope", "label"]
# for code_path in glob.glob("codes/cpp/chapter_*/my_heap.cpp"):