mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-24 18:55:36 +08:00
Add build script for Swift.
This commit is contained in:
@ -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"):
|
||||
|
Reference in New Issue
Block a user