Beter 2.7 end_if and COME_FROM determination

Fixes #149

... Add more tests too
This commit is contained in:
rocky
2018-02-17 07:16:14 -05:00
parent fa4f614295
commit 67ad08fd4a
4 changed files with 23 additions and 4 deletions

View File

@@ -130,6 +130,10 @@ class Python27Parser(Python2Parser):
whileelsestmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK
else_suitel COME_FROM
return_stmts ::= _stmts return_stmt
return_stmt ::= return
ifstmt ::= testexpr return_stmts COME_FROM
ifstmt ::= testexpr return_if_stmts COME_FROM
ifelsestmt ::= testexpr c_stmts_opt JUMP_FORWARD else_suite COME_FROM
ifelsestmtc ::= testexpr c_stmts_opt JUMP_ABSOLUTE else_suitec