correcting some garbage
This commit is contained in:
parent
8a601221fb
commit
ffdb3a893a
@ -294,9 +294,17 @@ class AST27Converter(object):
|
|||||||
handler = self.table[t]
|
handler = self.table[t]
|
||||||
ret = handler(tree)
|
ret = handler(tree)
|
||||||
|
|
||||||
for node in ast.walk(ret):
|
def _correct_tree(_ast, tree):
|
||||||
node.lineno = tree.line
|
for node in ast.walk(_ast):
|
||||||
node.col_offset = tree.column
|
node.lineno = tree.line
|
||||||
|
node.col_offset = tree.column
|
||||||
|
|
||||||
|
|
||||||
|
if isinstance(ret, list):
|
||||||
|
for r in ret:
|
||||||
|
_correct_tree(r, tree)
|
||||||
|
else:
|
||||||
|
_correct_tree(ret, tree)
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user