You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 08:34:46 +08:00
Regularize "or" so args are in 1..2 and ...
correct "return None" semantic action
This commit is contained in:
2
test/.gitignore
vendored
2
test/.gitignore
vendored
@@ -2,5 +2,7 @@
|
||||
/.python-version
|
||||
/nohup.out
|
||||
/pycdc
|
||||
/test_pycdc_tests.sh
|
||||
/test_uncompyle2.py
|
||||
/test_unpy33.py
|
||||
/test_unpy37.py
|
||||
|
@@ -956,8 +956,8 @@ class Python37Parser(Python37BaseParser):
|
||||
and ::= expr JUMP_IF_FALSE_OR_POP expr come_from_opt
|
||||
and ::= expr jifop_come_from expr
|
||||
|
||||
pjit_come_from ::= POP_JUMP_IF_TRUE COME_FROM
|
||||
or ::= expr pjit_come_from expr
|
||||
expr_pjit_come_from ::= expr POP_JUMP_IF_TRUE COME_FROM
|
||||
or ::= expr_pjit_come_from expr
|
||||
|
||||
## Note that "jmp_false" is what we check on in the "and" reduce rule.
|
||||
and ::= expr jmp_false expr COME_FROM
|
||||
|
@@ -516,7 +516,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
if self.return_none or not self.is_return_none(node):
|
||||
self.default(node)
|
||||
else:
|
||||
self.template_engine(("return\n"), node)
|
||||
self.template_engine(("%|return\n",), node)
|
||||
|
||||
self.prune() # stop recursing
|
||||
|
||||
|
Reference in New Issue
Block a user