()
| 412 | } |
| 413 | |
| 414 | #consumeClassReference() { |
| 415 | var token = this.#makeToken("CLASS_REF"); |
| 416 | var value = this.#consumeChar(); |
| 417 | if (this.#currentChar() === "{") { |
| 418 | token.template = true; |
| 419 | value += this.#consumeChar(); |
| 420 | while (this.#currentChar() && this.#currentChar() !== "}") { |
| 421 | value += this.#consumeChar(); |
| 422 | } |
| 423 | if (this.#currentChar() !== "}") { |
| 424 | throw new Error("Unterminated class reference"); |
| 425 | } else { |
| 426 | value += this.#consumeChar(); |
| 427 | } |
| 428 | } else { |
| 429 | while (this.#isValidCSSChar(this.#currentChar()) || this.#currentChar() === "\\") { |
| 430 | if (this.#currentChar() === "\\") this.#consumeChar(); |
| 431 | value += this.#consumeChar(); |
| 432 | } |
| 433 | } |
| 434 | token.value = value; |
| 435 | token.end = this.#position; |
| 436 | return token; |
| 437 | } |
| 438 | |
| 439 | #consumeIdReference() { |
| 440 | var token = this.#makeToken("ID_REF"); |
no test coverage detected