MCPcopy Create free account
hub / github.com/angular/angular / _tokenizeExpansionForm

Method _tokenizeExpansionForm

packages/compiler/src/ml_parser/lexer.ts:468–492  ·  view source on GitHub ↗

* @returns whether an ICU token has been created * @internal

()

Source from the content-addressed store, hash-verified

466 * @internal
467 */
468 private _tokenizeExpansionForm(): boolean {
469 if (this.isExpansionFormStart()) {
470 this._consumeExpansionFormStart();
471 return true;
472 }
473
474 if (isExpansionCaseStart(this._cursor.peek()) && this._isInExpansionForm()) {
475 this._consumeExpansionCaseStart();
476 return true;
477 }
478
479 if (this._cursor.peek() === chars.$RBRACE) {
480 if (this._isInExpansionCase()) {
481 this._consumeExpansionCaseEnd();
482 return true;
483 }
484
485 if (this._isInExpansionForm()) {
486 this._consumeExpansionFormEnd();
487 return true;
488 }
489 }
490
491 return false;
492 }
493
494 private _beginToken(type: TokenType, start = this._cursor.clone()) {
495 this._currentTokenStart = start;

Callers 1

tokenizeMethod · 0.95

Calls 9

isExpansionFormStartMethod · 0.95
_isInExpansionFormMethod · 0.95
_isInExpansionCaseMethod · 0.95
isExpansionCaseStartFunction · 0.85
peekMethod · 0.65

Tested by

no test coverage detected