@@ -180,7 +180,7 @@ DEF_RULE(try_stmt_except_and_more, nc, and(3), rule(try_stmt_except_list), opt_r
180
180
DEF_RULE (try_stmt_except , nc , and (4 ), tok (KW_EXCEPT ), opt_rule (try_stmt_as_name ), tok (DEL_COLON ), rule (suite ))
181
181
DEF_RULE (try_stmt_as_name , nc , and (2 ), rule (test ), opt_rule (as_name ))
182
182
DEF_RULE (try_stmt_except_list , nc , one_or_more , rule (try_stmt_except ))
183
- DEF_RULE (try_stmt_finally , nc , and (3 ), tok (KW_FINALLY ), tok (DEL_COLON ), rule (suite ))
183
+ DEF_RULE (try_stmt_finally , nc , ident | and (3 ), tok (KW_FINALLY ), tok (DEL_COLON ), rule (suite ))
184
184
DEF_RULE (else_stmt , nc , ident | and (3 ), tok (KW_ELSE ), tok (DEL_COLON ), rule (suite ))
185
185
DEF_RULE (with_stmt , c (with_stmt ), and (4 ), tok (KW_WITH ), rule (with_stmt_list ), tok (DEL_COLON ), rule (suite ))
186
186
DEF_RULE (with_stmt_list , nc , list , rule (with_item ), tok (DEL_COMMA ))
@@ -247,8 +247,7 @@ DEF_RULE(power_dbl_star, nc, ident | and(2), tok(OP_DBL_STAR), rule(factor))
247
247
// testlist_comp: (test|star_expr) ( comp_for | (',' (test|star_expr))* [','] )
248
248
// trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME
249
249
250
- DEF_RULE (atom , nc , or (11 ), tok (NAME ), tok (INTEGER ), tok (FLOAT_OR_IMAG ), rule (atom_string ), tok (ELLIPSIS ), tok (KW_NONE ), tok (KW_TRUE ), tok (KW_FALSE ), rule (atom_paren ), rule (atom_bracket ), rule (atom_brace ))
251
- DEF_RULE<
8000
/span>(atom_string , c (atom_string ), one_or_more , rule (string_or_bytes ))
250
+ DEF_RULE (atom , nc , or (12 ), tok (NAME ), tok (INTEGER ), tok (FLOAT_OR_IMAG ), tok (STRING ), tok (BYTES ), tok (ELLIPSIS ), tok (KW_NONE ), tok (KW_TRUE ), tok (KW_FALSE ), rule (atom_paren ), rule (atom_bracket ), rule (atom_brace ))
252
251
DEF_RULE (string_or_bytes , nc , or (2 ), tok (STRING ), tok (BYTES ))
253
252
DEF_RULE (atom_paren , c (atom_paren ), and (3 ), tok (DEL_PAREN_OPEN ), opt_rule (atom_2b ), tok (DEL_PAREN_CLOSE ))
254
253
DEF_RULE (atom_2b , nc , or (2 ), rule (yield_expr ), rule (testlist_comp ))
@@ -276,7 +275,7 @@ DEF_RULE(subscript_3, c(subscript_3), and(2), tok(DEL_COLON), opt_rule(subscript
276
275
DEF_RULE (subscript_3b , nc , or (2 ), rule (subscript_3c ), rule (subscript_3d ))
277
276
DEF_RULE (subscript_3c , nc , and (2 ), tok (DEL_COLON ), opt_rule (test ))
278
277
DEF_RULE (subscript_3d , nc , and (2 ), rule (test ), opt_rule (sliceop ))
279
- DEF_RULE (sliceop , nc , and (2 ), tok (DEL_COLON ), opt_rule (test ))
278
+ DEF_RULE (sliceop , nc , ident | and (2 ), tok (DEL_COLON ), opt_rule (test ))
280
279
#else
281
280
DEF_RULE (subscriptlist , c (generic_tuple ), list_with_end , rule (test ), tok (DEL_COMMA ))
282
281
#endif
0 commit comments