You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Add 3.6+ grammar for except's ending in RETURN...
Not totally out of the maze in 3.6 control flow... There are still problems with erroneous RETURN_VALUEs becoming RETURN_END_IF,
This commit is contained in:
@@ -57,6 +57,12 @@ class Python36Parser(Python35Parser):
|
||||
WITH_CLEANUP_FINISH END_FINALLY
|
||||
|
||||
except_suite ::= c_stmts_opt COME_FROM POP_EXCEPT jump_except COME_FROM
|
||||
|
||||
# In 3.6+, A sequence of statements ending in a RETURN can cause
|
||||
# JUMP_FORWARD END_FINALLY to be omitted from try middle
|
||||
|
||||
except_return ::= POP_TOP POP_TOP POP_TOP return_stmts
|
||||
try_middle ::= JUMP_FORWARD COME_FROM_EXCEPT except_return
|
||||
"""
|
||||
|
||||
def add_custom_rules(self, tokens, customize):
|
||||
|
Reference in New Issue
Block a user