Part of the decompye3 loop "continue" fixes

This commit is contained in:
rocky
2021-12-17 16:08:29 -05:00
parent 16c900ff1d
commit da2314f5ae
4 changed files with 75 additions and 1 deletions

View File

@@ -49,6 +49,7 @@ class Python38Parser(Python37Parser):
stmt ::= whilestmt38
stmt ::= whileTruestmt38
stmt ::= call_stmt
stmt ::= continue
call_stmt ::= call
break ::= POP_BLOCK BREAK_LOOP
@@ -56,6 +57,12 @@ class Python38Parser(Python37Parser):
break ::= POP_TOP BREAK_LOOP
break ::= POP_EXCEPT BREAK_LOOP
# The "continue" rule is a weird one. In 3.8, CONTINUE_LOOP was removed.
# Inside an loop we can have this, which can only appear in side a try/except
# And it can also appear at the end of the try except.
continue ::= POP_EXCEPT JUMP_BACK
# FIXME: this should be restricted to being inside a try block
stmt ::= except_ret38
stmt ::= except_ret38a