You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Python 3.6+ try/else with no trailing END_FINALLY
This commit is contained in:
@@ -122,9 +122,12 @@ class Python36Parser(Python35Parser):
|
|||||||
try_except36 ::= SETUP_EXCEPT returns except_handler36
|
try_except36 ::= SETUP_EXCEPT returns except_handler36
|
||||||
opt_come_from_except
|
opt_come_from_except
|
||||||
try_except36 ::= SETUP_EXCEPT suite_stmts
|
try_except36 ::= SETUP_EXCEPT suite_stmts
|
||||||
|
try_except36 ::= SETUP_EXCEPT suite_stmts_opt POP_BLOCK
|
||||||
|
except_handler36 opt_come_from_except
|
||||||
|
|
||||||
# 3.6 omits END_FINALLY sometimes
|
# 3.6 omits END_FINALLY sometimes
|
||||||
except_handler36 ::= COME_FROM_EXCEPT except_stmts
|
except_handler36 ::= COME_FROM_EXCEPT except_stmts
|
||||||
|
except_handler36 ::= JUMP_FORWARD COME_FROM_EXCEPT except_stmts
|
||||||
except_handler ::= jmp_abs COME_FROM_EXCEPT except_stmts
|
except_handler ::= jmp_abs COME_FROM_EXCEPT except_stmts
|
||||||
|
|
||||||
stmt ::= tryfinally36
|
stmt ::= tryfinally36
|
||||||
@@ -170,6 +173,7 @@ class Python36Parser(Python35Parser):
|
|||||||
JUMP_ABSOLUTE END_FINALLY COME_FROM
|
JUMP_ABSOLUTE END_FINALLY COME_FROM
|
||||||
for_block pb_ja
|
for_block pb_ja
|
||||||
else_suite COME_FROM_LOOP
|
else_suite COME_FROM_LOOP
|
||||||
|
|
||||||
""")
|
""")
|
||||||
self.check_reduce['call_kw'] = 'AST'
|
self.check_reduce['call_kw'] = 'AST'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user