You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Fix 3.2 for/if loopback bug
problem was handling in Python 3.2 for ... if ... else: .... jump for come from if jump for In later Python 3's a "come from" is removed. Also, start to DRY parser{,2,3} grammar rules.
This commit is contained in:
@@ -344,25 +344,6 @@ class Python2Parser(PythonParser):
|
||||
l_stmts_opt JUMP_BACK
|
||||
POP_BLOCK
|
||||
else_suitec COME_FROM
|
||||
|
||||
_for ::= GET_ITER FOR_ITER
|
||||
_for ::= LOAD_CONST FOR_LOOP
|
||||
|
||||
for_block ::= l_stmts_opt JUMP_BACK
|
||||
for_block ::= return_stmts _come_from
|
||||
|
||||
forstmt ::= SETUP_LOOP expr _for designator
|
||||
for_block POP_BLOCK COME_FROM
|
||||
|
||||
forelsestmt ::= SETUP_LOOP expr _for designator
|
||||
for_block POP_BLOCK else_suite COME_FROM
|
||||
|
||||
forelselaststmt ::= SETUP_LOOP expr _for designator
|
||||
for_block POP_BLOCK else_suitec COME_FROM
|
||||
|
||||
forelselaststmtl ::= SETUP_LOOP expr _for designator
|
||||
for_block POP_BLOCK else_suitel COME_FROM
|
||||
|
||||
'''
|
||||
|
||||
def p_expr2(self, args):
|
||||
|
Reference in New Issue
Block a user