()
| 331 | return ws; |
| 332 | } |
| 333 | #consumeClassReference() { |
| 334 | var token = this.#makeToken("CLASS_REF"); |
| 335 | var value = this.#consumeChar(); |
| 336 | if (this.#currentChar() === "{") { |
| 337 | token.template = true; |
| 338 | value += this.#consumeChar(); |
| 339 | while (this.#currentChar() && this.#currentChar() !== "}") { |
| 340 | value += this.#consumeChar(); |
| 341 | } |
| 342 | if (this.#currentChar() !== "}") { |
| 343 | throw new Error("Unterminated class reference"); |
| 344 | } else { |
| 345 | value += this.#consumeChar(); |
| 346 | } |
| 347 | } else { |
| 348 | while (this.#isValidCSSChar(this.#currentChar()) || this.#currentChar() === "\\") { |
| 349 | if (this.#currentChar() === "\\") this.#consumeChar(); |
| 350 | value += this.#consumeChar(); |
| 351 | } |
| 352 | } |
| 353 | token.value = value; |
| 354 | token.end = this.#position; |
| 355 | return token; |
| 356 | } |
| 357 | #consumeIdReference() { |
| 358 | var token = this.#makeToken("ID_REF"); |
| 359 | var value = this.#consumeChar(); |
no test coverage detected