ifc-expressions
Version:
Parsing and evaluation of IFC expressions
88 lines (87 loc) • 3.73 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.E = void 0;
const ArrayExpr_js_1 = require("./expression/structure/ArrayExpr.js");
const StringConcatExpr_js_1 = require("./expression/string/StringConcatExpr.js");
const StringLiteralExpr_js_1 = require("./expression/string/StringLiteralExpr.js");
const ElemObjectReferenceExpr_js_1 = require("./expression/reference/ElemObjectReferenceExpr.js");
const PropObjectReferenceExpr_js_1 = require("./expression/reference/PropObjectReferenceExpr.js");
const DivideExpr_js_1 = require("./expression/numeric/DivideExpr.js");
const MinusExpr_js_1 = require("./expression/numeric/MinusExpr.js");
const MultiplyExpr_js_1 = require("./expression/numeric/MultiplyExpr.js");
const PlusExpr_js_1 = require("./expression/numeric/PlusExpr.js");
const NumericLiteralExpr_js_1 = require("./expression/numeric/NumericLiteralExpr.js");
const ParenthesisExpr_js_1 = require("./expression/structure/ParenthesisExpr.js");
const PowerExpr_js_1 = require("./expression/numeric/PowerExpr.js");
const UnaryMinusExpr_js_1 = require("./expression/numeric/UnaryMinusExpr.js");
const FunctionExpr_js_1 = require("./expression/function/FunctionExpr.js");
const AndExpr_js_1 = require("./expression/boolean/AndExpr.js");
const OrExpr_js_1 = require("./expression/boolean/OrExpr.js");
const XorExpr_js_1 = require("./expression/boolean/XorExpr.js");
const BooleanLiteralExpr_js_1 = require("./expression/boolean/BooleanLiteralExpr.js");
const NotExpr_js_1 = require("./expression/boolean/NotExpr.js");
const LogicalLiteralExpr_js_1 = require("./expression/boolean/LogicalLiteralExpr.js");
class E {
static array(...elements) {
return new ArrayExpr_js_1.ArrayExpr(elements);
}
static concat(left, right) {
return new StringConcatExpr_js_1.StringConcatExpr(left, right);
}
static string(literal) {
return new StringLiteralExpr_js_1.StringLiteralExpr(literal);
}
static element() {
return new ElemObjectReferenceExpr_js_1.ElemObjectReferenceExpr();
}
static property() {
return new PropObjectReferenceExpr_js_1.PropObjectReferenceExpr();
}
static div(left, right) {
return new DivideExpr_js_1.DivideExpr(left, right);
}
static minus(left, right) {
return new MinusExpr_js_1.MinusExpr(left, right);
}
static multiply(left, right) {
return new MultiplyExpr_js_1.MultiplyExpr(left, right);
}
static plus(left, right) {
return new PlusExpr_js_1.PlusExpr(left, right);
}
static number(literal) {
return new NumericLiteralExpr_js_1.NumericLiteralExpr(literal);
}
static parenthesis(numericExpression) {
return new ParenthesisExpr_js_1.ParenthesisExpr(numericExpression);
}
static power(base, power) {
return new PowerExpr_js_1.PowerExpr(base, power);
}
static unaryMinus(numExpr) {
return new UnaryMinusExpr_js_1.UnaryMinusExpr(numExpr);
}
static fun(functionName, ...funcArgs) {
return new FunctionExpr_js_1.FunctionExpr(functionName, funcArgs);
}
static and(left, right) {
return new AndExpr_js_1.AndExpr(left, right);
}
static or(left, right) {
return new OrExpr_js_1.OrExpr(left, right);
}
static xor(left, right) {
return new XorExpr_js_1.XorExpr(left, right);
}
static boolean(literal) {
return new BooleanLiteralExpr_js_1.BooleanLiteralExpr(literal);
}
static logical(literal) {
return new LogicalLiteralExpr_js_1.LogicalLiteralExpr(literal);
}
static not(booleanExpr) {
return new NotExpr_js_1.NotExpr(booleanExpr);
}
}
exports.E = E;
//# sourceMappingURL=E.js.map