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