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

Method parseEquality

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

Source from the content-addressed store, hash-verified

950 }
951
952 private parseEquality(): AST {
953 // '==','!=','===','!=='
954 const start = this.inputIndex;
955 let result = this.parseRelational();
956 while (this.next.type == TokenType.Operator) {
957 const operator = this.next.strValue;
958 switch (operator) {
959 case '==':
960 case '===':
961 case '!=':
962 case '!==':
963 this.advance();
964 const right = this.parseRelational();
965 result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);
966 continue;
967 }
968 break;
969 }
970 return result;
971 }
972
973 private parseRelational(): AST {
974 // '<', '>', '<=', '>=', 'in', 'instanceof'

Callers 1

Calls 4

parseRelationalMethod · 0.95
advanceMethod · 0.95
spanMethod · 0.95
sourceSpanMethod · 0.95

Tested by

no test coverage detected