@@ -13123,14 +13123,6 @@ match8(const pm_parser_t *parser, pm_token_type_t type1, pm_token_type_t type2,
13123
13123
return match1(parser, type1) || match1(parser, type2) || match1(parser, type3) || match1(parser, type4) || match1(parser, type5) || match1(parser, type6) || match1(parser, type7) || match1(parser, type8);
13124
13124
}
13125
13125
13126
- /**
13127
- * Returns true if the current token is any of the nine given types.
13128
- */
13129
- static inline bool
13130
- match9(const pm_parser_t *parser, pm_token_type_t type1, pm_token_type_t type2, pm_token_type_t type3, pm_token_type_t type4, pm_token_type_t type5, pm_token_type_t type6, pm_token_type_t type7, pm_token_type_t type8, pm_token_type_t type9) {
13131
- return match1(parser, type1) || match1(parser, type2) || match1(parser, type3) || match1(parser, type4) || match1(parser, type5) || match1(parser, type6) || match1(parser, type7) || match1(parser, type8) || match1(parser, type9);
13132
- }
13133
-
13134
13126
/**
13135
13127
* If the current token is of the specified type, lex forward by one token and
13136
13128
* return true. Otherwise, return false. For example:
@@ -17675,7 +17667,7 @@ parse_pattern(pm_parser_t *parser, pm_constant_id_list_t *captures, uint8_t flag
17675
17667
// Gather up all of the patterns into the list.
17676
17668
while (accept1(parser, PM_TOKEN_COMMA)) {
17677
17669
// Break early here in case we have a trailing comma.
17678
- if (match9 (parser, PM_TOKEN_KEYWORD_THEN, PM_TOKEN_BRACE_RIGHT, PM_TOKEN_BRACKET_RIGHT, PM_TOKEN_PARENTHESIS_RIGHT, PM_TOKEN_SEMICOLON, PM_TOKEN_NEWLINE, PM_TOKEN_EOF, PM_TOKEN_KEYWORD_AND, PM_TOKEN_KEYWORD_OR)) {
17670
+ if (match7 (parser, PM_TOKEN_KEYWORD_THEN, PM_TOKEN_BRACE_RIGHT, PM_TOKEN_BRACKET_RIGHT, PM_TOKEN_PARENTHESIS_RIGHT, PM_TOKEN_SEMICOLON, PM_TOKEN_KEYWORD_AND, PM_TOKEN_KEYWORD_OR)) {
17679
17671
node = (pm_node_t *) pm_implicit_rest_node_create(parser, &parser->previous);
17680
17672
pm_node_list_append(&nodes, node);
17681
17673
trailing_rest = true;
0 commit comments