UNPKG

ifc-expressions

Version:

Parsing and evaluation of IFC expressions

216 lines (215 loc) 8.73 kB
import { ParseTreeVisitor } from 'antlr4'; import { ExprContext } from "./IfcExpressionParser.js"; import { SEComparisonContext } from "./IfcExpressionParser.js"; import { SELiteralContext } from "./IfcExpressionParser.js"; import { SEParenthesisContext } from "./IfcExpressionParser.js"; import { SEMulDivContext } from "./IfcExpressionParser.js"; import { SEPowerContext } from "./IfcExpressionParser.js"; import { SEBooleanBinaryOpContext } from "./IfcExpressionParser.js"; import { SEFunctionCallContext } from "./IfcExpressionParser.js"; import { SEArrayExprContext } from "./IfcExpressionParser.js"; import { SENotContext } from "./IfcExpressionParser.js"; import { SEVariableRefContext } from "./IfcExpressionParser.js"; import { SEUnaryMultipleMinusContext } from "./IfcExpressionParser.js"; import { SEUnaryMinusContext } from "./IfcExpressionParser.js"; import { SEAddSubContext } from "./IfcExpressionParser.js"; import { SEMethodCallContext } from "./IfcExpressionParser.js"; import { MethodCallChainInnerContext } from "./IfcExpressionParser.js"; import { MethodCallChainEndContext } from "./IfcExpressionParser.js"; import { FunctionCallContext } from "./IfcExpressionParser.js"; import { ExprListContext } from "./IfcExpressionParser.js"; import { ArrayExprContext } from "./IfcExpressionParser.js"; import { ArrayElementListContext } from "./IfcExpressionParser.js"; import { LiteralContext } from "./IfcExpressionParser.js"; import { NumLiteralContext } from "./IfcExpressionParser.js"; import { StringLiteralContext } from "./IfcExpressionParser.js"; import { BooleanLiteralContext } from "./IfcExpressionParser.js"; import { LogicalLiteralContext } from "./IfcExpressionParser.js"; import { VariableRefContext } from "./IfcExpressionParser.js"; /** * This interface defines a complete generic visitor for a parse tree produced * by `IfcExpressionParser`. * * @param <Result> The return type of the visit operation. Use `void` for * operations with no return type. */ export default class IfcExpressionVisitor<Result> extends ParseTreeVisitor<Result> { /** * Visit a parse tree produced by `IfcExpressionParser.expr`. * @param ctx the parse tree * @return the visitor result */ visitExpr?: (ctx: ExprContext) => Result; /** * Visit a parse tree produced by the `SEComparison` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSEComparison?: (ctx: SEComparisonContext) => Result; /** * Visit a parse tree produced by the `SELiteral` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSELiteral?: (ctx: SELiteralContext) => Result; /** * Visit a parse tree produced by the `SEParenthesis` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSEParenthesis?: (ctx: SEParenthesisContext) => Result; /** * Visit a parse tree produced by the `SEMulDiv` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSEMulDiv?: (ctx: SEMulDivContext) => Result; /** * Visit a parse tree produced by the `SEPower` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSEPower?: (ctx: SEPowerContext) => Result; /** * Visit a parse tree produced by the `SEBooleanBinaryOp` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSEBooleanBinaryOp?: (ctx: SEBooleanBinaryOpContext) => Result; /** * Visit a parse tree produced by the `SEFunctionCall` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSEFunctionCall?: (ctx: SEFunctionCallContext) => Result; /** * Visit a parse tree produced by the `SEArrayExpr` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSEArrayExpr?: (ctx: SEArrayExprContext) => Result; /** * Visit a parse tree produced by the `SENot` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSENot?: (ctx: SENotContext) => Result; /** * Visit a parse tree produced by the `SEVariableRef` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSEVariableRef?: (ctx: SEVariableRefContext) => Result; /** * Visit a parse tree produced by the `SEUnaryMultipleMinus` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSEUnaryMultipleMinus?: (ctx: SEUnaryMultipleMinusContext) => Result; /** * Visit a parse tree produced by the `SEUnaryMinus` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSEUnaryMinus?: (ctx: SEUnaryMinusContext) => Result; /** * Visit a parse tree produced by the `SEAddSub` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSEAddSub?: (ctx: SEAddSubContext) => Result; /** * Visit a parse tree produced by the `SEMethodCall` * labeled alternative in `IfcExpressionParser.singleExpr`. * @param ctx the parse tree * @return the visitor result */ visitSEMethodCall?: (ctx: SEMethodCallContext) => Result; /** * Visit a parse tree produced by the `methodCallChainInner` * labeled alternative in `IfcExpressionParser.methodCallChain`. * @param ctx the parse tree * @return the visitor result */ visitMethodCallChainInner?: (ctx: MethodCallChainInnerContext) => Result; /** * Visit a parse tree produced by the `methodCallChainEnd` * labeled alternative in `IfcExpressionParser.methodCallChain`. * @param ctx the parse tree * @return the visitor result */ visitMethodCallChainEnd?: (ctx: MethodCallChainEndContext) => Result; /** * Visit a parse tree produced by `IfcExpressionParser.functionCall`. * @param ctx the parse tree * @return the visitor result */ visitFunctionCall?: (ctx: FunctionCallContext) => Result; /** * Visit a parse tree produced by `IfcExpressionParser.exprList`. * @param ctx the parse tree * @return the visitor result */ visitExprList?: (ctx: ExprListContext) => Result; /** * Visit a parse tree produced by `IfcExpressionParser.arrayExpr`. * @param ctx the parse tree * @return the visitor result */ visitArrayExpr?: (ctx: ArrayExprContext) => Result; /** * Visit a parse tree produced by `IfcExpressionParser.arrayElementList`. * @param ctx the parse tree * @return the visitor result */ visitArrayElementList?: (ctx: ArrayElementListContext) => Result; /** * Visit a parse tree produced by `IfcExpressionParser.literal`. * @param ctx the parse tree * @return the visitor result */ visitLiteral?: (ctx: LiteralContext) => Result; /** * Visit a parse tree produced by `IfcExpressionParser.numLiteral`. * @param ctx the parse tree * @return the visitor result */ visitNumLiteral?: (ctx: NumLiteralContext) => Result; /** * Visit a parse tree produced by `IfcExpressionParser.stringLiteral`. * @param ctx the parse tree * @return the visitor result */ visitStringLiteral?: (ctx: StringLiteralContext) => Result; /** * Visit a parse tree produced by `IfcExpressionParser.booleanLiteral`. * @param ctx the parse tree * @return the visitor result */ visitBooleanLiteral?: (ctx: BooleanLiteralContext) => Result; /** * Visit a parse tree produced by `IfcExpressionParser.logicalLiteral`. * @param ctx the parse tree * @return the visitor result */ visitLogicalLiteral?: (ctx: LogicalLiteralContext) => Result; /** * Visit a parse tree produced by `IfcExpressionParser.variableRef`. * @param ctx the parse tree * @return the visitor result */ visitVariableRef?: (ctx: VariableRefContext) => Result; }