| 651 | } |
| 652 | |
| 653 | static bool constructor_trivia(TSLexer *lexer, bool *newline) { |
| 654 | for (;;) { |
| 655 | while (constructor_space(lexer->lookahead)) { |
| 656 | if (lexer->lookahead == '\n' || lexer->lookahead == '\r') *newline = true; |
| 657 | advance(lexer); |
| 658 | } |
| 659 | if (lexer->lookahead != '/') return true; |
| 660 | advance(lexer); |
| 661 | if (lexer->lookahead == '/') { |
| 662 | while (!lexer->eof(lexer) && lexer->lookahead != '\n' && lexer->lookahead != '\r') advance(lexer); |
| 663 | } else if (lexer->lookahead == '*') { |
| 664 | advance(lexer); |
| 665 | unsigned depth = 1; |
| 666 | while (depth && !lexer->eof(lexer)) { |
| 667 | int32_t c = lexer->lookahead; |
| 668 | if (c == '\n' || c == '\r') *newline = true; |
| 669 | advance(lexer); |
| 670 | if (c == '/' && lexer->lookahead == '*') { advance(lexer); depth++; } |
| 671 | else if (c == '*' && lexer->lookahead == '/') { advance(lexer); depth--; } |
| 672 | } |
| 673 | if (depth) return false; |
| 674 | } else return false; |
| 675 | } |
| 676 | } |
| 677 | |
| 678 | // Read complete identifiers, including non-ASCII continuations. Only an |
| 679 | // entirely ASCII word can be a modifier/constructor keyword. The generated |
no test coverage detected