You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 08:49:51 +08:00
Start to narrow 3.7 FUNCTION_EX grammar
This commit is contained in:
@@ -294,20 +294,30 @@ class Python36Parser(Python35Parser):
|
||||
call_ex ::= expr starred CALL_FUNCTION_EX
|
||||
""", nop_func)
|
||||
if self.version > 3.6:
|
||||
self.addRule("""
|
||||
expr ::= call_ex_kw
|
||||
if 'BUILD_TUPLE_UNPACK_WITH_CALL' in self.seen_ops:
|
||||
self.addRule("""
|
||||
expr ::= call_ex_kw3
|
||||
expr ::= call_ex_kw4
|
||||
call_ex_kw3 ::= expr
|
||||
build_tuple_unpack_with_call
|
||||
expr
|
||||
%s
|
||||
CALL_FUNCTION_EX
|
||||
""" % 'expr '* token.attr, nop_func)
|
||||
elif 'BUILD_MAP_UNPACK_WITH_CALL' in self.seen_ops:
|
||||
# FIXME: Is this right?
|
||||
self.addRule("""
|
||||
expr ::= call_ex_kw
|
||||
call_ex_kw ::= expr expr
|
||||
build_map_unpack_with_call CALL_FUNCTION_EX
|
||||
""", nop_func)
|
||||
pass
|
||||
|
||||
# FIXME: Is this right?
|
||||
self.addRule("""
|
||||
expr ::= call_ex_kw4
|
||||
call_ex_kw4 ::= expr
|
||||
expr
|
||||
expr
|
||||
CALL_FUNCTION_EX
|
||||
call_ex_kw ::= expr expr
|
||||
build_map_unpack_with_call CALL_FUNCTION_EX
|
||||
""", nop_func)
|
||||
pass
|
||||
else:
|
||||
|
Reference in New Issue
Block a user