| 123 | static inline void advance(TSLexer *lexer) { lexer->advance(lexer, false); } |
| 124 | |
| 125 | static unsigned utf8_width(int32_t c) { |
| 126 | return c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; |
| 127 | } |
| 128 | |
| 129 | static void advance_counted(TSLexer *lexer, uint32_t *bytes, bool whitespace) { |
| 130 | if (bytes) { |