Check line ranges on local macros.
This commit is contained in:
parent
b5765d123e
commit
8df27ff9e6
1 changed files with 2 additions and 2 deletions
|
@ -195,8 +195,7 @@ class CrossRef:
|
|||
defn = self.fileref[defn]
|
||||
if defn.undef != None:
|
||||
# Local macros are only visible in the file where they were defined
|
||||
# FIXME: we should check line spans here.
|
||||
return defn.filename == fn
|
||||
return defn.filename == fn and n >= defn.lineno and n <= defn.undef
|
||||
elif defn.filename in self.filelist.forest[0]:
|
||||
# Macros in the first subtree are visible everywhere.
|
||||
return True
|
||||
|
@ -316,6 +315,7 @@ class CrossRef:
|
|||
# Find references to resource files
|
||||
for match in re.finditer(CrossRef.file_reference, line):
|
||||
name = match.group(0)
|
||||
# Catches maps that look like macro names.
|
||||
if name.endswith(".map") and name[0] == '{':
|
||||
name = name[1:]
|
||||
key = None
|
||||
|
|
Loading…
Add table
Reference in a new issue