You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
while1 bug in 2.6 and 2.7
This commit is contained in:
@@ -145,7 +145,6 @@ class Python26Parser(Python2Parser):
|
||||
whileelsestmt ::= SETUP_LOOP testexpr l_stmts_opt jb_pop POP_BLOCK
|
||||
else_suite COME_FROM
|
||||
|
||||
|
||||
while1stmt ::= SETUP_LOOP return_stmts bp_come_from
|
||||
|
||||
return_stmt ::= ret_expr RETURN_END_IF come_from_pop
|
||||
|
@@ -50,6 +50,8 @@ class Python27Parser(Python2Parser):
|
||||
withasstmt ::= expr SETUP_WITH designator suite_stmts_opt
|
||||
POP_BLOCK LOAD_CONST COME_FROM
|
||||
WITH_CLEANUP END_FINALLY
|
||||
|
||||
while1stmt ::= SETUP_LOOP l_stmts POP_BLOCK COME_FROM
|
||||
"""
|
||||
|
||||
|
||||
|
@@ -439,7 +439,7 @@ class Scanner2(scan.Scanner):
|
||||
# Is jump back really "back"?
|
||||
jump_target = self.get_target(jump_back, code[jump_back])
|
||||
if (jump_target > jump_back or
|
||||
code[jump_back+3] == self.opc.JUMP_FORWARD):
|
||||
code[jump_back+3] in [self.opc.JUMP_FORWARD, self.opc.JUMP_ABSOLUTE]):
|
||||
jump_back = None
|
||||
pass
|
||||
else:
|
||||
|
Reference in New Issue
Block a user