Improve comment handling and macro name recognition in macroscope.
This commit is contained in:
parent
35bf230d16
commit
7a7b0ca40b
1 changed files with 4 additions and 2 deletions
|
@ -75,9 +75,11 @@ class macro_cross_reference:
|
|||
formals = line.split()[2:]
|
||||
elif line.startswith("#enddef"):
|
||||
formals = []
|
||||
if line[0] == "#" or "{" not in line:
|
||||
if '#' in line:
|
||||
line = line.split('#')[0]
|
||||
if not line or "{" not in line:
|
||||
continue
|
||||
for match in re.finditer(r"\{([A-Z][A-Z0-9_:]*[A-Z0-9])\b", line):
|
||||
for match in re.finditer(r"\{([A-Z][A-Z0-9_:]*[A-Z0-9_])\b", line):
|
||||
name = match.group(1)
|
||||
if name in formals:
|
||||
continue
|
||||
|
|
Loading…
Add table
Reference in a new issue