summaryrefslogtreecommitdiff
path: root/py/grammar.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-08-13 21:23:02 +1000
committerDamien George <damien.p.george@gmail.com>2017-08-13 21:23:02 +1000
commit72912c753a31301efb7d6b2f35dd1e3e64b98cd4 (patch)
treed6d52e4cbf5d7021e3b92778b66772df25ee6ea6 /py/grammar.h
parentbe020eb2c3c7e8421ee0989a7a09498a91b974fb (diff)
py: Deoptimise try-finally and subscript parse nodes to match master.
This is a small de-optimisation so that it's easier to merge master into this branch.
Diffstat (limited to 'py/grammar.h')
-rw-r--r--py/grammar.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/grammar.h b/py/grammar.h
index 004e14826..89a5a0653 100644
--- a/py/grammar.h
+++ b/py/grammar.h
@@ -180,7 +180,7 @@ DEF_RULE(try_stmt_except_and_more, nc, and(3), rule(try_stmt_except_list), opt_r
DEF_RULE(try_stmt_except, nc, and(4), tok(KW_EXCEPT), opt_rule(try_stmt_as_name), tok(DEL_COLON), rule(suite))
DEF_RULE(try_stmt_as_name, nc, and(2), rule(test), opt_rule(as_name))
DEF_RULE(try_stmt_except_list, nc, one_or_more, rule(try_stmt_except))
-DEF_RULE(try_stmt_finally, nc, ident | and(3), tok(KW_FINALLY), tok(DEL_COLON), rule(suite))
+DEF_RULE(try_stmt_finally, nc, and(3), tok(KW_FINALLY), tok(DEL_COLON), rule(suite))
DEF_RULE(else_stmt, nc, ident | and(3), tok(KW_ELSE), tok(DEL_COLON), rule(suite))
DEF_RULE(with_stmt, c(with_stmt), and(4), tok(KW_WITH), rule(with_stmt_list), tok(DEL_COLON), rule(suite))
DEF_RULE(with_stmt_list, nc, list, rule(with_item), tok(DEL_COMMA))
@@ -275,7 +275,7 @@ DEF_RULE(subscript_3, c(subscript_3), and(2), tok(DEL_COLON), opt_rule(subscript
DEF_RULE(subscript_3b, nc, or(2), rule(subscript_3c), rule(subscript_3d))
DEF_RULE(subscript_3c, nc, and(2), tok(DEL_COLON), opt_rule(test))
DEF_RULE(subscript_3d, nc, and(2), rule(test), opt_rule(sliceop))
-DEF_RULE(sliceop, nc, ident | and(2), tok(DEL_COLON), opt_rule(test))
+DEF_RULE(sliceop, nc, and(2), tok(DEL_COLON), opt_rule(test))
#else
DEF_RULE(subscriptlist, c(generic_tuple), list_with_end, rule(test), tok(DEL_COMMA))
#endif