You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Fragment fixes (and workarounds)
fragments.py: add more parent offsets. blacken buffer parser3.py: additional grammar rules for fragment parser Misc small typos and corrections
This commit is contained in:
@@ -68,6 +68,11 @@ class Python3Parser(PythonParser):
|
||||
set_comp_func ::= BUILD_SET_0 LOAD_FAST FOR_ITER store comp_iter
|
||||
JUMP_BACK RETURN_VALUE RETURN_LAST
|
||||
|
||||
# FIXME: This is used only in the fragment parser
|
||||
# Fix the fragment parser so that it adds RETURN_LAST
|
||||
set_comp_func ::= BUILD_SET_0 LOAD_FAST FOR_ITER store comp_iter
|
||||
JUMP_BACK RETURN_VALUE
|
||||
|
||||
set_comp_func ::= BUILD_SET_0 LOAD_FAST FOR_ITER store comp_iter
|
||||
COME_FROM JUMP_BACK RETURN_VALUE RETURN_LAST
|
||||
|
||||
@@ -341,6 +346,10 @@ class Python3Parser(PythonParser):
|
||||
stmt ::= return_closure
|
||||
return_closure ::= LOAD_CLOSURE RETURN_VALUE RETURN_LAST
|
||||
|
||||
# FIXME: This is used only in the fragment parser
|
||||
# Fix the fragment parser so that it adds RETURN_LAST
|
||||
return_closure ::= LOAD_CLOSURE RETURN_VALUE
|
||||
|
||||
stmt ::= whileTruestmt
|
||||
ifelsestmt ::= testexpr c_stmts_opt JUMP_FORWARD else_suite _come_froms
|
||||
"""
|
||||
|
Reference in New Issue
Block a user