Update regular expressions in gen-magic-strings.py (#2527)
In their past form, they could not recognize preprocessor directives, if they didn't start on column 0. Updated them to fix this problem. JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
This commit is contained in:
@@ -119,10 +119,10 @@ def extract_magic_string_refs(debug=False):
|
|||||||
guard_stack = []
|
guard_stack = []
|
||||||
|
|
||||||
for line in fileinput.input(fname):
|
for line in fileinput.input(fname):
|
||||||
if_match = re.match('^# *if(.*)', line)
|
if_match = re.match('^ *# *if(.*)', line)
|
||||||
elif_match = re.match('^# *elif(.*)', line)
|
elif_match = re.match('^ *# *elif(.*)', line)
|
||||||
else_match = re.match('^# *else', line)
|
else_match = re.match('^ *# *else', line)
|
||||||
endif_match = re.match('^# *endif', line)
|
endif_match = re.match('^ *# *endif', line)
|
||||||
if if_match is not None:
|
if if_match is not None:
|
||||||
guard_stack.append([process_guard(if_match.group(1))])
|
guard_stack.append([process_guard(if_match.group(1))])
|
||||||
elif elif_match is not None:
|
elif elif_match is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user