correcting some garbage

This commit is contained in:
Paul Tagliamonte 2012-12-23 00:09:40 -05:00
parent 8a601221fb
commit ffdb3a893a

View File

@ -294,10 +294,18 @@ class AST27Converter(object):
handler = self.table[t]
ret = handler(tree)
for node in ast.walk(ret):
def _correct_tree(_ast, tree):
for node in ast.walk(_ast):
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