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