* @returns {string} the token's value (raw source slice unless overridden)
()
| 1317 | * @returns {string} the token's value (raw source slice unless overridden) |
| 1318 | */ |
| 1319 | get value() { |
| 1320 | const input = this._locConverter._input; |
| 1321 | const type = this.type; |
| 1322 | // hash (`#name` → `name`) and at-keyword (`@name` → `name`) drop one char. |
| 1323 | if (type === T_HASH || type === T_AT_KEYWORD) { |
| 1324 | return input.slice(this.start + 1, this.end); |
| 1325 | } |
| 1326 | if (type === T_URL) { |
| 1327 | const u = /** @type {UrlToken} */ (/** @type {unknown} */ (this)); |
| 1328 | return input.slice(u.contentStart, u.contentEnd); |
| 1329 | } |
| 1330 | return input.slice(this.start, this.end); |
| 1331 | } |
| 1332 | |
| 1333 | /** |
| 1334 | * The token's value with CSS escapes resolved (`\2d` → `-`, `\75 rl` → `url`), |
no test coverage detected