You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Handle walrus operator
Or rather set precedence on call_stmt and expr_stmt Adjust pytest test_single_compile so it works now
This commit is contained in:
@@ -43,6 +43,13 @@ class Python37Parser(Python37BaseParser):
|
||||
call_stmt ::= expr POP_TOP
|
||||
"""
|
||||
|
||||
def p_eval_mode(self, args):
|
||||
"""
|
||||
# eval-mode compilation. Single-mode interactive compilation
|
||||
# adds another rule.
|
||||
expr_stmt ::= expr POP_TOP
|
||||
"""
|
||||
|
||||
def p_stmt(self, args):
|
||||
"""
|
||||
pass ::=
|
||||
@@ -99,6 +106,7 @@ class Python37Parser(Python37BaseParser):
|
||||
else_suite_opt ::= pass
|
||||
|
||||
stmt ::= classdef
|
||||
stmt ::= expr_stmt
|
||||
stmt ::= call_stmt
|
||||
|
||||
stmt ::= ifstmt
|
||||
|
Reference in New Issue
Block a user