UNPKG

simc-ast-builder

Version:

Parser and AST generator for SimulationCraft files

14 lines 795 B
import { ParserRuleContext } from "antlr4ts"; import { ExpressionNode } from "../common-types"; import { SimCGenericVisitor } from "../SimCGenericVisitor"; import { AccessHandlerParams } from "./ContextHandlerRegistry"; /** * Type definition for the common handler function signature with generic return type * This allows handlers to specify their exact return type */ export type AccessHandlerFn<T extends ExpressionNode = ExpressionNode, Ctx extends ParserRuleContext = ParserRuleContext> = (params: AccessHandlerParams<Ctx>) => T; /** * Type definition for context handler functions (no "parts" argument) */ export type ContextHandlerFn<T = any, Ctx extends ParserRuleContext = ParserRuleContext> = (ctx: Ctx, visitor: SimCGenericVisitor) => T; //# sourceMappingURL=BaseHandler.d.ts.map