()
| 449 | } |
| 450 | |
| 451 | private _getLetDeclarationName(): string { |
| 452 | const nameCursor = this._cursor.clone(); |
| 453 | let allowDigit = false; |
| 454 | |
| 455 | this._attemptCharCodeUntilFn((code) => { |
| 456 | if ( |
| 457 | chars.isAsciiLetter(code) || |
| 458 | code === chars.$$ || |
| 459 | code === chars.$_ || |
| 460 | // `@let` names can't start with a digit, but digits are valid anywhere else in the name. |
| 461 | (allowDigit && chars.isDigit(code)) |
| 462 | ) { |
| 463 | allowDigit = true; |
| 464 | return false; |
| 465 | } |
| 466 | return true; |
| 467 | }); |
| 468 | |
| 469 | return this._cursor.getChars(nameCursor).trim(); |
| 470 | } |
| 471 | |
| 472 | private _consumeLetDeclarationValue(): void { |
| 473 | const start = this._cursor.clone(); |
no test coverage detected