You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
3.8 ifelsestmt grammar rule...
and remove optional "c_stmts" in 3.7 "ifelsesmt" rule. We may have to come back and add something, but when we do we'll be more careful and this is probably all for the better.
This commit is contained in:
BIN
test/bytecode_3.8/01_extended_arg.pyc
Normal file
BIN
test/bytecode_3.8/01_extended_arg.pyc
Normal file
Binary file not shown.
@@ -818,7 +818,7 @@ class Python37Parser(Python37BaseParser):
|
||||
|
||||
# This handles the case where a "JUMP_ABSOLUTE" is part
|
||||
# of an inner if in c_stmts_opt
|
||||
ifelsestmt ::= testexpr c_stmts_opt come_froms
|
||||
ifelsestmt ::= testexpr c_stmts come_froms
|
||||
else_suite come_froms
|
||||
|
||||
# ifelsestmt ::= testexpr c_stmts_opt jump_forward_else
|
||||
|
@@ -88,6 +88,10 @@ class Python38Parser(Python37Parser):
|
||||
ifpoplaststmtl ::= testexpr POP_TOP c_stmts_opt JUMP_BACK
|
||||
ifelsestmtl ::= testexpr c_stmts_opt jb_cfs else_suitel JUMP_BACK come_froms
|
||||
|
||||
# Keep indices the same in ifelsestmtl
|
||||
cf_pt ::= COME_FROM POP_TOP
|
||||
ifelsestmtl ::= testexpr c_stmts cf_pt else_suite
|
||||
|
||||
for38 ::= expr get_iter store for_block JUMP_BACK
|
||||
for38 ::= expr get_for_iter store for_block JUMP_BACK
|
||||
for38 ::= expr get_for_iter store for_block JUMP_BACK POP_BLOCK
|
||||
|
Reference in New Issue
Block a user