ifc-expressions
Version:
Parsing and evaluation of IFC expressions
24 lines (23 loc) • 854 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BooleanLiteralExpr = void 0;
const LiteralExpr_js_1 = require("../LiteralExpr.js");
const BooleanValue_js_1 = require("../../value/BooleanValue.js");
const ExprKind_js_1 = require("../ExprKind.js");
const Types_js_1 = require("../../type/Types.js");
class BooleanLiteralExpr extends LiteralExpr_js_1.LiteralExpr {
constructor(value) {
super(ExprKind_js_1.ExprKind.BOOLEAN_LITERAL, value);
}
calculateResult(ctx) {
return BooleanValue_js_1.BooleanValue.of(this.value);
}
buildExprString(builder) {
builder.appendString(this.value === true ? "TRUE" : "FALSE");
}
getType() {
return Types_js_1.Type.BOOLEAN;
}
}
exports.BooleanLiteralExpr = BooleanLiteralExpr;
//# sourceMappingURL=BooleanLiteralExpr.js.map