ifc-expressions
Version:
Parsing and evaluation of IFC expressions
20 lines (19 loc) • 669 B
JavaScript
import { Expr2 } from "../Expr2.js";
import { ExprKind } from "../ExprKind.js";
import { BooleanValue } from "../../value/BooleanValue.js";
import { Type } from "../../type/Types.js";
export class NotEqualsExpr extends Expr2 {
constructor(left, right) {
super(ExprKind.CMP_NOT_EQUALS, left, right);
}
calculateResult(ctx, localCtx, leftOperand, rightOperand) {
return BooleanValue.of(!leftOperand.equals(rightOperand));
}
buildExprString(builder) {
builder.appendExpr(this.left).appendString(" != ").appendExpr(this.right);
}
getType() {
return Type.BOOLEAN;
}
}
//# sourceMappingURL=NotEqualsExpr.js.map