| 693 | } |
| 694 | |
| 695 | static bool constructor_word(TSLexer *lexer, char *word, unsigned capacity) { |
| 696 | unsigned length = 0; |
| 697 | bool ascii = true; |
| 698 | while (!lexer->eof(lexer) && constructor_word_char(lexer->lookahead)) { |
| 699 | if (lexer->lookahead >= 128 || length + 1 >= capacity) ascii = false; |
| 700 | if (length + 1 < capacity) word[length++] = (char)lexer->lookahead; |
| 701 | advance(lexer); |
| 702 | } |
| 703 | word[length] = '\0'; |
| 704 | return ascii && length > 0; |
| 705 | } |
| 706 | |
| 707 | static bool constructor_modifier(const char *word) { |
| 708 | static const char *const words[] = { |
no test coverage detected