()
| 566 | } |
| 567 | |
| 568 | #consumeIdentifier() { |
| 569 | var token = this.#makeToken("IDENTIFIER"); |
| 570 | var value = this.#consumeChar(); |
| 571 | while (this.#isAlpha(this.#currentChar()) || this.#isNumeric(this.#currentChar()) || this.#isIdentifierChar(this.#currentChar())) { |
| 572 | value += this.#consumeChar(); |
| 573 | } |
| 574 | if (this.#currentChar() === "!" && value === "beep") { |
| 575 | value += this.#consumeChar(); |
| 576 | } |
| 577 | token.value = value; |
| 578 | token.end = this.#position; |
| 579 | return token; |
| 580 | } |
| 581 | |
| 582 | #consumeNumber() { |
| 583 | var token = this.#makeToken("NUMBER"); |
no test coverage detected