UNPKG

ifc-expressions

Version:

Parsing and evaluation of IFC expressions

20 lines (19 loc) 613 B
import { LiteralExpr } from "../LiteralExpr.js"; import { BooleanValue } from "../../value/BooleanValue.js"; import { ExprKind } from "../ExprKind.js"; import { Type } from "../../type/Types.js"; export class BooleanLiteralExpr extends LiteralExpr { constructor(value) { super(ExprKind.BOOLEAN_LITERAL, value); } calculateResult(ctx) { return BooleanValue.of(this.value); } buildExprString(builder) { builder.appendString(this.value === true ? "TRUE" : "FALSE"); } getType() { return Type.BOOLEAN; } } //# sourceMappingURL=BooleanLiteralExpr.js.map