Small grammar isolation bugs

This commit is contained in:
rocky
2017-12-02 10:57:32 -05:00
parent 5872caee54
commit 93949e8222
2 changed files with 3 additions and 9 deletions

View File

@@ -1041,15 +1041,10 @@ class Scanner2(Scanner):
# or:
# RETURN_VALUE POP_TOP .. POP_TOP END_FINALLY
skip_come_from = False
if self.version <= 2.5:
if self.version <= 2.6:
skip_come_from = (code[offset+3] == self.opc.END_FINALLY or
(code[offset+3] == self.opc.POP_TOP
and code[offset+4] == self.opc.END_FINALLY))
else:
skip_come_from = (code[offset+3] == self.opc.END_FINALLY or
(op != self.opc.JUMP_FORWARD
and code[offset+3] == self.opc.POP_TOP
and code[offset+4] == self.opc.END_FINALLY))
if not skip_come_from:
# FIXME: rocky: I think we need something like this...
if offset not in set(self.ignore_if):