MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / parseCompare

Method parseCompare

packages/core/src/constraints/parser.ts:123–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121 }
122
123 private parseCompare(): ExprNode {
124 const left = this.parseAdditive();
125 this.skipWhitespace();
126 const op = this.consumeCompareOp();
127 if (op === null) return left;
128 const right = this.parseAdditive();
129 this.skipWhitespace();
130 const extra = this.consumeCompareOp();
131 if (extra !== null) {
132 this.fail(
133 "Only one comparison operator is allowed in a compare expression",
134 this.pos - extra.length,
135 );
136 }
137 return { kind: "compare", op, left, right };
138 }
139
140 private parseAdditive(): ExprNode {
141 let left = this.parseMultiplicative();

Callers 1

parseTernaryMethod · 0.95

Calls 4

parseAdditiveMethod · 0.95
skipWhitespaceMethod · 0.95
consumeCompareOpMethod · 0.95
failMethod · 0.95

Tested by

no test coverage detected