You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
JUMP_IF_{TRUE,FALSE}_OR_OP fixes
This commit is contained in:
@@ -22,6 +22,8 @@ class Python26Parser(Python2Parser):
|
||||
JUMP_IF_FALSE POP_TOP POP_TOP designator POP_TOP
|
||||
try_middle ::= JUMP_FORWARD COME_FROM except_stmts
|
||||
POP_TOP END_FINALLY come_froms
|
||||
try_middle ::= JUMP_FORWARD COME_FROM except_stmts
|
||||
COME_FROM POP_TOP END_FINALLY come_froms
|
||||
try_middle ::= JUMP_FORWARD COME_FROM except_stmts
|
||||
END_FINALLY come_froms
|
||||
try_middle ::= jmp_abs COME_FROM except_stmts
|
||||
@@ -71,6 +73,13 @@ class Python26Parser(Python2Parser):
|
||||
lc_body ::= LOAD_NAME expr LIST_APPEND
|
||||
'''
|
||||
|
||||
def p_ret26(self, args):
|
||||
'''
|
||||
ret_cond ::= expr jmp_false expr RETURN_END_IF COME_FROM POP_TOP ret_expr_or_cond
|
||||
ret_or ::= expr jmp_true ret_expr_or_cond COME_FROM
|
||||
'''
|
||||
|
||||
|
||||
class Python26ParserSingle(Python2Parser, PythonParserSingle):
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user