@@ -2243,6 +2243,40 @@ static inline bool sym_identifier_character_set_1(int32_t c) {
22432243 : c <= 65279)))));
22442244}
22452245
2246+ static inline bool sym_identifier_character_set_2(int32_t c) {
2247+ return (c < '`'
2248+ ? (c < '%'
2249+ ? (c < 0
2250+ ? c == 0
2251+ : c <= '#')
2252+ : (c <= '/' || (c < '['
2253+ ? (c >= ':' && c <= '@')
2254+ : c <= '^')))
2255+ : (c <= '~' || (c < 8288
2256+ ? (c < 8203
2257+ ? c == 160
2258+ : c <= 8203)
2259+ : (c <= 8288 || c == 65279))));
2260+ }
2261+
2262+ static inline bool sym_identifier_character_set_3(int32_t c) {
2263+ return (c < '`'
2264+ ? (c < '%'
2265+ ? (c < 0
2266+ ? c == 0
2267+ : c <= '#')
2268+ : (c <= '/' || (c < '['
2269+ ? (c >= ':' && c <= '@')
2270+ : c <= '^')))
2271+ : (c <= '`' || (c < 8203
2272+ ? (c < 160
2273+ ? (c >= '|' && c <= '~')
2274+ : c <= 160)
2275+ : (c <= 8203 || (c < 65279
2276+ ? c == 8288
2277+ : c <= 65279)))));
2278+ }
2279+
22462280static bool ts_lex(TSLexer *lexer, TSStateId state) {
22472281 START_LEXER();
22482282 eof = lexer->eof(lexer);
@@ -3444,16 +3478,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
34443478 ACCEPT_TOKEN(sym_regex_flags);
34453479 if (lookahead == '\\') ADVANCE(23);
34463480 if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(175);
3447- if (lookahead != 0 &&
3448- lookahead > '#' &&
3449- (lookahead < '%' || '/' < lookahead) &&
3450- (lookahead < ':' || '@' < lookahead) &&
3451- (lookahead < '[' || '^' < lookahead) &&
3452- (lookahead < '`' || '~' < lookahead) &&
3453- lookahead != 160 &&
3454- lookahead != 8203 &&
3455- lookahead != 8288 &&
3456- lookahead != 65279) ADVANCE(188);
3481+ if (!sym_identifier_character_set_2(lookahead)) ADVANCE(188);
34573482 END_STATE();
34583483 case 176:
34593484 ACCEPT_TOKEN(sym_number);
@@ -3548,17 +3573,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
35483573 ACCEPT_TOKEN(sym_identifier);
35493574 if (lookahead == '\\') ADVANCE(23);
35503575 if (lookahead == '{') ADVANCE(171);
3551- if (lookahead != 0 &&
3552- lookahead > '#' &&
3553- (lookahead < '%' || '/' < lookahead) &&
3554- (lookahead < ':' || '@' < lookahead) &&
3555- (lookahead < '[' || '^' < lookahead) &&
3556- lookahead != '`' &&
3557- (lookahead < '|' || '~' < lookahead) &&
3558- lookahead != 160 &&
3559- lookahead != 8203 &&
3560- lookahead != 8288 &&
3561- lookahead != 65279) ADVANCE(188);
3576+ if (!sym_identifier_character_set_3(lookahead)) ADVANCE(188);
35623577 END_STATE();
35633578 case 188:
35643579 ACCEPT_TOKEN(sym_identifier);
0 commit comments