You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Get ready for release 3.8.1 ...
and more 3.7 grammar customization
This commit is contained in:
@@ -41,14 +41,12 @@ def test_grammar():
|
||||
expect_lhs.add("annotate_arg")
|
||||
expect_lhs.add("annotate_tuple")
|
||||
unused_rhs.add("mkfunc_annotate")
|
||||
if PYTHON_VERSION < 3.7:
|
||||
unused_rhs.add('call')
|
||||
unused_rhs.add("dict_comp")
|
||||
unused_rhs.add("classdefdeco1")
|
||||
if PYTHON_VERSION < 3.6:
|
||||
# 3.6 has at least one non-custom call rule
|
||||
# the others don't
|
||||
unused_rhs.add('call')
|
||||
if PYTHON_VERSION == 3.5:
|
||||
if PYTHON_VERSION != 3.6:
|
||||
if PYTHON_VERSION in (3.5, 3.7):
|
||||
expect_right_recursive.add((('l_stmts',
|
||||
('lastl_stmt', 'come_froms', 'l_stmts'))))
|
||||
pass
|
||||
@@ -61,7 +59,7 @@ def test_grammar():
|
||||
pass
|
||||
else:
|
||||
expect_lhs.add('kwarg')
|
||||
unused_rhs.add('call')
|
||||
# unused_rhs.add('call')
|
||||
|
||||
assert expect_lhs == set(lhs)
|
||||
assert unused_rhs == set(rhs)
|
||||
|
BIN
test/bytecode_3.7/01_while_if_then.pyc
Normal file
BIN
test/bytecode_3.7/01_while_if_then.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.7/02_build_map_unpack_with_call.pyc
Normal file
BIN
test/bytecode_3.7/02_build_map_unpack_with_call.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.7/02_genexpr.pyc
Normal file
BIN
test/bytecode_3.7/02_genexpr.pyc
Normal file
Binary file not shown.
@@ -595,6 +595,11 @@ class Python3Parser(PythonParser):
|
||||
return_lambda LAMBDA_MARKER
|
||||
""", nop_func)
|
||||
|
||||
if self.version <= 3.6:
|
||||
call_function1 = 'CALL_FUNCTION_1'
|
||||
else:
|
||||
call_function1 = 'CALL_METHOD_1'
|
||||
|
||||
has_get_iter_call_function1 = False
|
||||
n = len(tokens)
|
||||
max_branches = 0
|
||||
|
@@ -37,6 +37,7 @@ class Python37Parser(Python36Parser):
|
||||
attributes ::= IMPORT_FROM ROT_TWO POP_TOP IMPORT_FROM
|
||||
|
||||
# FIXME: generalize and specialize
|
||||
attribute37 ::= LOAD_FAST LOAD_METHOD
|
||||
attribute37 ::= LOAD_NAME LOAD_METHOD
|
||||
expr ::= attribute37
|
||||
|
||||
|
@@ -12,4 +12,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# This file is suitable for sourcing inside bash as
|
||||
# well as importing into Python
|
||||
VERSION='3.1.2'
|
||||
VERSION='3.1.3'
|
||||
|
Reference in New Issue
Block a user