UNPKG

ifc-expressions

Version:

Parsing and evaluation of IFC expressions

17 lines (16 loc) 570 B
import { Expr2 } from "../Expr2.js"; import { BooleanValue } from "../../value/BooleanValue.js"; import { Type } from "../../type/Types.js"; export class ComparisonOp extends Expr2 { constructor(exprKind, left, right, cmp) { super(exprKind, left, right); this.comparisonFunction = cmp; } calculateResult(ctx, localCtx, leftOperand, rightOperand) { return BooleanValue.of(this.comparisonFunction(leftOperand.compareTo(rightOperand))); } getType() { return Type.BOOLEAN; } } //# sourceMappingURL=ComparisonOp.js.map