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

Method _tokenizeExpansionForm

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

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

()

Source from the content-addressed store, hash-verified

481 * @internal
482 */
483 private _tokenizeExpansionForm(): boolean {
484 if (this.isExpansionFormStart()) {
485 this._consumeExpansionFormStart();
486 return true;
487 }
488
489 if (isExpansionCaseStart(this._cursor.peek()) && this._isInExpansionForm()) {
490 this._consumeExpansionCaseStart();
491 return true;
492 }
493
494 if (this._cursor.peek() === chars.$RBRACE) {
495 if (this._isInExpansionCase()) {
496 this._consumeExpansionCaseEnd();
497 return true;
498 }
499
500 if (this._isInExpansionForm()) {
501 this._consumeExpansionFormEnd();
502 return true;
503 }
504 }
505
506 return false;
507 }
508
509 private _beginToken(type: TokenType, start = this._cursor.clone()) {
510 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