You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Isolate "and2" rule to 2.3
This commit is contained in:
@@ -465,7 +465,6 @@ class PythonParser(GenericASTBuilder):
|
||||
expr ::= cmp
|
||||
expr ::= mapexpr
|
||||
expr ::= and
|
||||
expr ::= and2
|
||||
expr ::= or
|
||||
expr ::= unary_expr
|
||||
expr ::= call_function
|
||||
@@ -510,10 +509,6 @@ class PythonParser(GenericASTBuilder):
|
||||
_mklambda ::= load_closure mklambda
|
||||
_mklambda ::= mklambda
|
||||
|
||||
# "and" where the first part of the and is true,
|
||||
# so there is only the 2nd part to evaluate
|
||||
and2 ::= _jump jmp_false COME_FROM expr COME_FROM
|
||||
|
||||
expr ::= conditional
|
||||
conditional ::= expr jmp_false expr JUMP_FORWARD expr COME_FROM
|
||||
conditional ::= expr jmp_false expr JUMP_ABSOLUTE expr
|
||||
|
@@ -42,6 +42,11 @@ class Python23Parser(Python24Parser):
|
||||
lc_body ::= LOAD_FAST expr CALL_FUNCTION_1 POP_TOP
|
||||
lc_body ::= LOAD_NAME expr LIST_APPEND
|
||||
lc_body ::= LOAD_FAST expr LIST_APPEND
|
||||
|
||||
# "and" where the first part of the and is true,
|
||||
# so there is only the 2nd part to evaluate
|
||||
expr ::= and2
|
||||
and2 ::= _jump jmp_false COME_FROM expr COME_FROM
|
||||
'''
|
||||
|
||||
def add_custom_rules(self, tokens, customize):
|
||||
|
Reference in New Issue
Block a user