You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Handle 3.0 call_stmt better
This commit is contained in:
@@ -17,6 +17,7 @@ class Python30Parser(Python31Parser):
|
|||||||
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1 COME_FROM POP_TOP
|
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1 COME_FROM POP_TOP
|
||||||
assert2 ::= assert_expr jmp_true LOAD_ASSERT expr CALL_FUNCTION_1 RAISE_VARARGS_1
|
assert2 ::= assert_expr jmp_true LOAD_ASSERT expr CALL_FUNCTION_1 RAISE_VARARGS_1
|
||||||
come_froms
|
come_froms
|
||||||
|
call_stmt ::= expr _come_froms POP_TOP
|
||||||
|
|
||||||
return_if_lambda ::= RETURN_END_IF_LAMBDA COME_FROM POP_TOP
|
return_if_lambda ::= RETURN_END_IF_LAMBDA COME_FROM POP_TOP
|
||||||
compare_chained2 ::= expr COMPARE_OP RETURN_END_IF_LAMBDA
|
compare_chained2 ::= expr COMPARE_OP RETURN_END_IF_LAMBDA
|
||||||
|
@@ -40,6 +40,7 @@ def customize_for_version26_27(self, version):
|
|||||||
'testtrue_then': ( 'not %p', (0, 22) ),
|
'testtrue_then': ( 'not %p', (0, 22) ),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# FIXME: this should be a transformation
|
||||||
def n_call(node):
|
def n_call(node):
|
||||||
mapping = self._get_mapping(node)
|
mapping = self._get_mapping(node)
|
||||||
key = node
|
key = node
|
||||||
|
@@ -790,7 +790,7 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
|||||||
self.name = code_name
|
self.name = code_name
|
||||||
|
|
||||||
# Issue created with later Python code generation is that there
|
# Issue created with later Python code generation is that there
|
||||||
# is a lamda set up with a dummy argument name that is then called
|
# is a lambda set up with a dummy argument name that is then called
|
||||||
# So we can't just translate that as is but need to replace the
|
# So we can't just translate that as is but need to replace the
|
||||||
# dummy name. Below we are picking out the variable name as seen
|
# dummy name. Below we are picking out the variable name as seen
|
||||||
# in the code. And trying to generate code for the other parts
|
# in the code. And trying to generate code for the other parts
|
||||||
|
Reference in New Issue
Block a user