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

Method _tokenizeExpansionForm

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

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

()

Source from the content-addressed store, hash-verified

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