diff --git a/uncompyle6/semantics/pysource.py b/uncompyle6/semantics/pysource.py index af67c628..bef87b80 100644 --- a/uncompyle6/semantics/pysource.py +++ b/uncompyle6/semantics/pysource.py @@ -260,7 +260,8 @@ class SourceWalker(GenericASTTraversal, object): self.ast_errors = [] # FIXME: have p.insts update in a better way # modularity is broken here - self.p.insts = scanner.insts + self.insts = scanner.insts + self.offset2inst_index = scanner.offset2inst_index # This is in Python 2.6 on. It changes the way # strings get interpreted. See n_LOAD_CONST @@ -2407,9 +2408,11 @@ class SourceWalker(GenericASTTraversal, object): # modularity is broken here p_insts = self.p.insts self.p.insts = self.scanner.insts + self.p.offset2inst_index = self.scanner.offset2inst_index ast = python_parser.parse(self.p, tokens, customize) self.customize(customize) self.p.insts = p_insts + except (python_parser.ParserError, AssertionError) as e: raise ParserError(e, tokens) transform_ast = self.treeTransform.transform(ast) @@ -2442,8 +2445,8 @@ class SourceWalker(GenericASTTraversal, object): # modularity is broken here p_insts = self.p.insts self.p.insts = self.scanner.insts - self.p.opc = self.scanner.opc self.p.offset2inst_index = self.scanner.offset2inst_index + self.p.opc = self.scanner.opc ast = python_parser.parse(self.p, tokens, customize) self.p.insts = p_insts except (python_parser.ParserError, AssertionError) as e: