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

Method _tokenizeExpansionForm

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

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

()

Source from the content-addressed store, hash-verified

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