Internals: In astgen text output, pickup missing node references
This commit is contained in:
parent
7e355e211c
commit
ebf5c11e03
|
|
@ -382,7 +382,7 @@ def read_stages(filename):
|
||||||
line = re.sub(r'//.*$', '', line)
|
line = re.sub(r'//.*$', '', line)
|
||||||
if re.match(r'^\s*$', line):
|
if re.match(r'^\s*$', line):
|
||||||
continue
|
continue
|
||||||
match = re.match(r'^\s*([A-Za-z0-9]+)::', line)
|
match = re.search(r'\s([A-Za-z0-9]+)::', line)
|
||||||
if match:
|
if match:
|
||||||
stage = match.group(1) + ".cpp"
|
stage = match.group(1) + ".cpp"
|
||||||
if stage not in Stages:
|
if stage not in Stages:
|
||||||
|
|
@ -405,6 +405,12 @@ def read_refs(filename):
|
||||||
if ref not in ClassRefs:
|
if ref not in ClassRefs:
|
||||||
ClassRefs[ref] = {'newed': {}, 'used': {}}
|
ClassRefs[ref] = {'newed': {}, 'used': {}}
|
||||||
ClassRefs[ref]['used'][basename] = 1
|
ClassRefs[ref]['used'][basename] = 1
|
||||||
|
for match in re.finditer(
|
||||||
|
r'(VN_IS|VN_AS|VN_CAST)\([^.]+, ([A-Za-z0-9_]+)', line):
|
||||||
|
ref = "Ast" + match.group(2)
|
||||||
|
if ref not in ClassRefs:
|
||||||
|
ClassRefs[ref] = {'newed': {}, 'used': {}}
|
||||||
|
ClassRefs[ref]['used'][basename] = 1
|
||||||
|
|
||||||
|
|
||||||
def open_file(filename):
|
def open_file(filename):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue