()
| 355 | return token; |
| 356 | } |
| 357 | #consumeIdReference() { |
| 358 | var token = this.#makeToken("ID_REF"); |
| 359 | var value = this.#consumeChar(); |
| 360 | if (this.#currentChar() === "{") { |
| 361 | token.template = true; |
| 362 | value += this.#consumeChar(); |
| 363 | while (this.#currentChar() && this.#currentChar() !== "}") { |
| 364 | value += this.#consumeChar(); |
| 365 | } |
| 366 | if (this.#currentChar() !== "}") { |
| 367 | throw new Error("Unterminated id reference"); |
| 368 | } else { |
| 369 | this.#consumeChar(); |
| 370 | } |
| 371 | } else { |
| 372 | while (this.#isValidCSSChar(this.#currentChar())) { |
| 373 | value += this.#consumeChar(); |
| 374 | } |
| 375 | } |
| 376 | token.value = value; |
| 377 | token.end = this.#position; |
| 378 | return token; |
| 379 | } |
| 380 | #consumeAttributeReference() { |
| 381 | var token = this.#makeToken("ATTRIBUTE_REF"); |
| 382 | var value = this.#consumeChar(); |
no test coverage detected