Unverified Commit d9beb68b authored by Robin Mueller's avatar Robin Mueller
Browse files

increaed robustness of retval parser

parent e21e5b53
......@@ -58,7 +58,7 @@ class InterfaceParser(FileParser):
target_end_name = match.group(2)
start_matched = True
match = re.search(r'[\s]*([A-Z_0-9]*),?[\s]*//([^\n]*)?', line)
match = re.search(r'[\s]*([\w]*),?(?:[\s]*//)?([^\n]*)?', line)
if match:
count += 1
if re.search(r"\[EXPORT\][\s]*:[\s]*\[END\]", match.group(2)):
......@@ -66,7 +66,10 @@ class InterfaceParser(FileParser):
end_matched = True
self.end_name_list.append([last_entry_name, None])
current_file_table.update({count: [match.group(1), match.group(2)]})
short_name = match.group(2)
if short_name == "":
short_name = match.group(1)[0:3]
current_file_table.update({count: [match.group(1), short_name]})
if not start_matched:
print("No start match detected when parsing interface files..")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment