(position: number)
| 594 | } |
| 595 | |
| 596 | private readKeyword(position: number): KeywordToken { |
| 597 | const start = this.scanner.position; |
| 598 | |
| 599 | while (isRegularChar(this.scanner.peek())) { |
| 600 | this.scanner.advance(); |
| 601 | } |
| 602 | |
| 603 | const value = this.extractText(start, this.scanner.position); |
| 604 | |
| 605 | return { type: "keyword", value, position }; |
| 606 | } |
| 607 | |
| 608 | private extractText(start: number, end: number): string { |
| 609 | const bytes = this.scanner.bytes.subarray(start, end); |
no test coverage detected