()
| 437 | } |
| 438 | |
| 439 | private _getLetDeclarationName(): string { |
| 440 | const nameCursor = this._cursor.clone(); |
| 441 | let allowDigit = false; |
| 442 | |
| 443 | this._attemptCharCodeUntilFn((code) => { |
| 444 | if ( |
| 445 | chars.isAsciiLetter(code) || |
| 446 | code === chars.$$ || |
| 447 | code === chars.$_ || |
| 448 | // `@let` names can't start with a digit, but digits are valid anywhere else in the name. |
| 449 | (allowDigit && chars.isDigit(code)) |
| 450 | ) { |
| 451 | allowDigit = true; |
| 452 | return false; |
| 453 | } |
| 454 | return true; |
| 455 | }); |
| 456 | |
| 457 | return this._cursor.getChars(nameCursor).trim(); |
| 458 | } |
| 459 | |
| 460 | private _consumeLetDeclarationValue(): void { |
| 461 | const start = this._cursor.clone(); |
no test coverage detected