You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
mklambda -> lambda_body matches Python AST better
Note: we can't use "lambda" since that is a reserved word
This commit is contained in:
@@ -103,7 +103,7 @@ class Python2Parser(PythonParser):
|
||||
delete_subscript ::= expr expr DELETE_SUBSCR
|
||||
delete ::= expr DELETE_ATTR
|
||||
|
||||
_mklambda ::= load_closure mklambda
|
||||
_lambda_body ::= load_closure lambda_body
|
||||
kwarg ::= LOAD_CONST expr
|
||||
|
||||
kv3 ::= expr expr STORE_MAP
|
||||
@@ -540,7 +540,7 @@ class Python2Parser(PythonParser):
|
||||
elif opname_base == "MAKE_FUNCTION":
|
||||
if i > 0 and tokens[i - 1] == "LOAD_LAMBDA":
|
||||
self.addRule(
|
||||
"mklambda ::= %s LOAD_LAMBDA %s"
|
||||
"lambda_body ::= %s LOAD_LAMBDA %s"
|
||||
% ("pos_arg " * token.attr, opname),
|
||||
nop_func,
|
||||
)
|
||||
@@ -549,7 +549,7 @@ class Python2Parser(PythonParser):
|
||||
# FIXME: use add_unique_rules to tidy this up.
|
||||
if i > 0 and tokens[i - 1] == "LOAD_LAMBDA":
|
||||
self.addRule(
|
||||
"mklambda ::= %s load_closure LOAD_LAMBDA %s"
|
||||
"lambda_body ::= %s load_closure LOAD_LAMBDA %s"
|
||||
% ("expr " * token.attr, opname),
|
||||
nop_func,
|
||||
)
|
||||
|
Reference in New Issue
Block a user