feat(property): support second value in property

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
Neo Xu
2024-12-02 00:57:40 +08:00
committed by Gabor Kiss-Vamosi
parent 2d8ff35bfb
commit 133b6fc3f8
6 changed files with 111 additions and 50 deletions

View File

@@ -45,7 +45,7 @@ def find_headers(directory):
def read_widget_properties(directory):
def match_properties(file_path):
pattern = r'^\s*LV_PROPERTY_ID\((\w+),\s*(\w+),\s*(\w+),\s*(\d+)\)'
pattern = r'^\s*LV_PROPERTY_ID2?\((\w+),\s*(\w+),\s*(\w+)(,\s*(\w+))?,\s*(\d+)\)'
with open(file_path, 'r') as file:
for line in file.readlines():
match = re.match(pattern, line)