UNPKG

ifc-expressions

Version:

Parsing and evaluation of IFC expressions

20 lines (19 loc) 644 B
import { Expr2 } from "../Expr2.js"; import { Type, Types } from "../../type/Types.js"; export class BinaryBooleanOpExpr extends Expr2 { constructor(kind, method, left, right) { super(kind, left, right); this.method = method; } calculateResult(ctx, localCtx, leftOperand, rightOperand) { return leftOperand[this.method].call(leftOperand, rightOperand); } getType() { if (Types.isLogical(this.left.getType()) || Types.isLogical(this.right.getType())) { return Type.LOGICAL; } return Type.BOOLEAN; } } //# sourceMappingURL=BinaryBooleanOpExpr.js.map