MCPcopy Index your code
hub / github.com/angular/angular / _getLetDeclarationName

Method _getLetDeclarationName

packages/compiler/src/ml_parser/lexer.ts:434–453  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 1

Calls 3

cloneMethod · 0.65
getCharsMethod · 0.65

Tested by

no test coverage detected