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