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