ifc-expressions
Version:
Parsing and evaluation of IFC expressions
20 lines (19 loc) • 653 B
JavaScript
import { Expr2 } from "../Expr2.js";
import { StringValue } from "../../value/StringValue.js";
import { ExprKind } from "../ExprKind.js";
import { Type } from "../../type/Types.js";
export class StringConcatExpr extends Expr2 {
constructor(left, right) {
super(ExprKind.STR_CONCAT, left, right);
}
calculateResult(ctx, localCtx, left, right) {
return StringValue.of(left.getValue() + right.getValue());
}
buildExprString(builder) {
builder.appendExpr(this.left).appendString(" + ").appendExpr(this.right);
}
getType() {
return Type.STRING;
}
}
//# sourceMappingURL=StringConcatExpr.js.map