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

Method scanQuestion

packages/compiler/src/expression_parser/lexer.ts:537–556  ·  view source on GitHub ↗
(start: number)

Source from the content-addressed store, hash-verified

535 }
536
537 private scanQuestion(start: number): Token {
538 this.advance();
539 let operator = '?';
540 // `a ?? b` or `a ??= b`.
541 if (this.peek === chars.$QUESTION) {
542 operator += '?';
543 this.advance();
544
545 // @ts-expect-error
546 if (this.peek === chars.$EQ) {
547 operator += '=';
548 this.advance();
549 }
550 } else if (this.peek === chars.$PERIOD) {
551 // `a?.b`
552 operator += '.';
553 this.advance();
554 }
555 return newOperatorToken(start, this.index, operator);
556 }
557
558 private scanTemplateLiteralPart(start: number): Token {
559 let buffer = '';

Callers 1

scanTokenMethod · 0.95

Calls 2

advanceMethod · 0.95
newOperatorTokenFunction · 0.85

Tested by

no test coverage detected