UNPKG

ifc-expressions

Version:

Parsing and evaluation of IFC expressions

24 lines (23 loc) 881 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StringConcatExpr = void 0; const Expr2_js_1 = require("../Expr2.js"); const StringValue_js_1 = require("../../value/StringValue.js"); const ExprKind_js_1 = require("../ExprKind.js"); const Types_js_1 = require("../../type/Types.js"); class StringConcatExpr extends Expr2_js_1.Expr2 { constructor(left, right) { super(ExprKind_js_1.ExprKind.STR_CONCAT, left, right); } calculateResult(ctx, localCtx, left, right) { return StringValue_js_1.StringValue.of(left.getValue() + right.getValue()); } buildExprString(builder) { builder.appendExpr(this.left).appendString(" + ").appendExpr(this.right); } getType() { return Types_js_1.Type.STRING; } } exports.StringConcatExpr = StringConcatExpr; //# sourceMappingURL=StringConcatExpr.js.map