You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Improve 3.4 ifelse inside a lambda
This commit is contained in:
@@ -53,6 +53,10 @@ class Python34Parser(Python33Parser):
|
|||||||
_ifstmts_jump ::= c_stmts_opt JUMP_ABSOLUTE JUMP_FORWARD COME_FROM
|
_ifstmts_jump ::= c_stmts_opt JUMP_ABSOLUTE JUMP_FORWARD COME_FROM
|
||||||
|
|
||||||
genexpr_func ::= LOAD_ARG _come_froms FOR_ITER store comp_iter JUMP_BACK
|
genexpr_func ::= LOAD_ARG _come_froms FOR_ITER store comp_iter JUMP_BACK
|
||||||
|
|
||||||
|
if_exp_lambda ::= expr jmp_false expr return_if_lambda come_froms return_stmt_lambda LAMBDA_MARKER
|
||||||
|
|
||||||
|
return_if_stmt ::= return_expr RETURN_END_IF POP_BLOCK
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def customize_grammar_rules(self, tokens, customize):
|
def customize_grammar_rules(self, tokens, customize):
|
||||||
|
@@ -108,7 +108,6 @@ class Python35Parser(Python34Parser):
|
|||||||
# Python 3.5+ does jump optimization
|
# Python 3.5+ does jump optimization
|
||||||
# In <.3.5 the below is a JUMP_FORWARD to a JUMP_ABSOLUTE.
|
# In <.3.5 the below is a JUMP_FORWARD to a JUMP_ABSOLUTE.
|
||||||
|
|
||||||
return_if_stmt ::= return_expr RETURN_END_IF POP_BLOCK
|
|
||||||
return_if_lambda ::= RETURN_END_IF_LAMBDA COME_FROM
|
return_if_lambda ::= RETURN_END_IF_LAMBDA COME_FROM
|
||||||
|
|
||||||
return ::= return_expr RETURN_END_IF
|
return ::= return_expr RETURN_END_IF
|
||||||
|
Reference in New Issue
Block a user