ifc-expressions
Version:
Parsing and evaluation of IFC expressions
84 lines (83 loc) • 3.13 kB
JavaScript
import { ArrayExpr } from "./expression/structure/ArrayExpr.js";
import { StringConcatExpr } from "./expression/string/StringConcatExpr.js";
import { StringLiteralExpr } from "./expression/string/StringLiteralExpr.js";
import { ElemObjectReferenceExpr } from "./expression/reference/ElemObjectReferenceExpr.js";
import { PropObjectReferenceExpr } from "./expression/reference/PropObjectReferenceExpr.js";
import { DivideExpr } from "./expression/numeric/DivideExpr.js";
import { MinusExpr } from "./expression/numeric/MinusExpr.js";
import { MultiplyExpr } from "./expression/numeric/MultiplyExpr.js";
import { PlusExpr } from "./expression/numeric/PlusExpr.js";
import { NumericLiteralExpr } from "./expression/numeric/NumericLiteralExpr.js";
import { ParenthesisExpr } from "./expression/structure/ParenthesisExpr.js";
import { PowerExpr } from "./expression/numeric/PowerExpr.js";
import { UnaryMinusExpr } from "./expression/numeric/UnaryMinusExpr.js";
import { FunctionExpr } from "./expression/function/FunctionExpr.js";
import { AndExpr } from "./expression/boolean/AndExpr.js";
import { OrExpr } from "./expression/boolean/OrExpr.js";
import { XorExpr } from "./expression/boolean/XorExpr.js";
import { BooleanLiteralExpr } from "./expression/boolean/BooleanLiteralExpr.js";
import { NotExpr } from "./expression/boolean/NotExpr.js";
import { LogicalLiteralExpr } from "./expression/boolean/LogicalLiteralExpr.js";
export class E {
static array(...elements) {
return new ArrayExpr(elements);
}
static concat(left, right) {
return new StringConcatExpr(left, right);
}
static string(literal) {
return new StringLiteralExpr(literal);
}
static element() {
return new ElemObjectReferenceExpr();
}
static property() {
return new PropObjectReferenceExpr();
}
static div(left, right) {
return new DivideExpr(left, right);
}
static minus(left, right) {
return new MinusExpr(left, right);
}
static multiply(left, right) {
return new MultiplyExpr(left, right);
}
static plus(left, right) {
return new PlusExpr(left, right);
}
static number(literal) {
return new NumericLiteralExpr(literal);
}
static parenthesis(numericExpression) {
return new ParenthesisExpr(numericExpression);
}
static power(base, power) {
return new PowerExpr(base, power);
}
static unaryMinus(numExpr) {
return new UnaryMinusExpr(numExpr);
}
static fun(functionName, ...funcArgs) {
return new FunctionExpr(functionName, funcArgs);
}
static and(left, right) {
return new AndExpr(left, right);
}
static or(left, right) {
return new OrExpr(left, right);
}
static xor(left, right) {
return new XorExpr(left, right);
}
static boolean(literal) {
return new BooleanLiteralExpr(literal);
}
static logical(literal) {
return new LogicalLiteralExpr(literal);
}
static not(booleanExpr) {
return new NotExpr(booleanExpr);
}
}
//# sourceMappingURL=E.js.map