()
| 437 | } |
| 438 | |
| 439 | #consumeIdReference() { |
| 440 | var token = this.#makeToken("ID_REF"); |
| 441 | var value = this.#consumeChar(); |
| 442 | if (this.#currentChar() === "{") { |
| 443 | token.template = true; |
| 444 | value += this.#consumeChar(); |
| 445 | while (this.#currentChar() && this.#currentChar() !== "}") { |
| 446 | value += this.#consumeChar(); |
| 447 | } |
| 448 | if (this.#currentChar() !== "}") { |
| 449 | throw new Error("Unterminated id reference"); |
| 450 | } else { |
| 451 | this.#consumeChar(); |
| 452 | } |
| 453 | } else { |
| 454 | while (this.#isValidCSSChar(this.#currentChar())) { |
| 455 | value += this.#consumeChar(); |
| 456 | } |
| 457 | } |
| 458 | token.value = value; |
| 459 | token.end = this.#position; |
| 460 | return token; |
| 461 | } |
| 462 | |
| 463 | #consumeAttributeReference() { |
| 464 | var token = this.#makeToken("ATTRIBUTE_REF"); |
no test coverage detected