File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed
Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def check_tokens(tokens, opcode_set):
3939 s = get_scanner (PYTHON_VERSION , IS_PYPY )
4040 ignore_set = set (
4141 """
42- JUMP_BACK CONTINUE RETURN_END_IF
42+ JUMP_BACK CONTINUE RETURN_END_IF THEN
4343 COME_FROM COME_FROM_EXCEPT COME_FROM_LOOP COME_FROM_WITH
4444 COME_FROM_FINALLY ELSE
4545 LOAD_GENEXPR LOAD_ASSERT LOAD_SETCOMP LOAD_DICTCOMP
Original file line number Diff line number Diff line change @@ -136,17 +136,12 @@ def p_grammar(self, args):
136136
137137 _ifstmts_jump ::= return_if_stmts
138138
139- iflaststmt ::= testexpr c_stmts_opt JUMP_ABSOLUTE
140-
139+ iflaststmt ::= testexpr c_stmts_opt JUMP_ABSOLUTE
141140 iflaststmtl ::= testexpr c_stmts_opt JUMP_BACK
142-
143- ifelsestmt ::= testexpr c_stmts_opt JUMP_FORWARD else_suite COME_FROM
144- ifelsestmt ::= testexpr_then c_stmts_opt jf_cf_pop else_suite come_froms
145-
141+ ifelsestmt ::= testexpr c_stmts_opt JUMP_FORWARD else_suite COME_FROM
146142 ifelsestmtc ::= testexpr c_stmts_opt JUMP_ABSOLUTE else_suitec
147143
148144 ifelsestmtr ::= testexpr return_if_stmts return_stmts
149-
150145 ifelsestmtr ::= testexpr return_if_stmts COME_FROM return_stmts
151146
152147 ifelsestmtl ::= testexpr c_stmts_opt JUMP_BACK else_suitel
Original file line number Diff line number Diff line change @@ -113,6 +113,8 @@ def p_stmt26(self, args):
113113
114114 break_stmt ::= BREAK_LOOP JUMP_BACK
115115
116+ ifelsestmt ::= testexpr_then c_stmts_opt jf_cf_pop else_suite come_froms
117+
116118 # Semantic actions want else_suitel to be at index 3
117119 ifelsestmtl ::= testexpr c_stmts_opt jb_cf_pop else_suitel
118120 ifelsestmtc ::= testexpr c_stmts_opt ja_cf_pop else_suitec
You can’t perform that action at this time.
0 commit comments