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

Method parseAdditive

packages/compiler/src/expression_parser/parser.ts:993–1010  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

991 }
992
993 private parseAdditive(): AST {
994 // '+', '-'
995 const start = this.inputIndex;
996 let result = this.parseMultiplicative();
997 while (this.next.type == TokenType.Operator) {
998 const operator = this.next.strValue;
999 switch (operator) {
1000 case '+':
1001 case '-':
1002 this.advance();
1003 let right = this.parseMultiplicative();
1004 result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);
1005 continue;
1006 }
1007 break;
1008 }
1009 return result;
1010 }
1011
1012 private parseMultiplicative(): AST {
1013 // '*', '%', '/'

Callers 1

parseRelationalMethod · 0.95

Calls 4

parseMultiplicativeMethod · 0.95
advanceMethod · 0.95
spanMethod · 0.95
sourceSpanMethod · 0.95

Tested by

no test coverage detected