UNPKG

ifc-expressions

Version:

Parsing and evaluation of IFC expressions

24 lines (23 loc) 672 B
import { ExprBase } from "./ExprBase.js"; import { ExprEvalErrorObj, ExprEvalStatus, } from "./ExprEvalResult.js"; export class Expr0 extends ExprBase { constructor(kind) { super(kind); } getChildren() { return []; } evaluate(ctx, localCtx) { try { const result = this.doEvaluate(ctx, localCtx); return this.wrapInResultIfNecessary(result); } catch (error) { return this.handleError(error); } } handleError(error) { return new ExprEvalErrorObj(this.getKind(), ExprEvalStatus.ERROR, error, this.getTextSpan()); } } //# sourceMappingURL=Expr0.js.map