Add 3.0 try/except rule

This commit is contained in:
rocky
2019-11-15 23:39:36 -05:00
parent bc8907e752
commit 44f0ba0efb
2 changed files with 15 additions and 4 deletions

View File

@@ -12,6 +12,8 @@ class Python30Parser(Python31Parser):
def p_30(self, args):
"""
pt_bp ::= POP_TOP POP_BLOCK
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1 COME_FROM POP_TOP
return_if_lambda ::= RETURN_END_IF_LAMBDA COME_FROM POP_TOP
compare_chained2 ::= expr COMPARE_OP RETURN_END_IF_LAMBDA
@@ -89,6 +91,11 @@ class Python30Parser(Python31Parser):
LOAD_FAST FOR_ITER store dict_comp_iter
JUMP_BACK
stmt ::= try_except30
try_except30 ::= SETUP_EXCEPT suite_stmts_opt
_come_froms pt_bp
except_handler opt_come_from_except
# From Python 2.6