UNPKG

simc-ast-builder

Version:

Parser and AST generator for SimulationCraft files

21 lines 865 B
import { ParserRuleContext } from "antlr4ts/ParserRuleContext"; export type ExpressionType = "boolean" | "numeric" | "neutral"; export interface FieldDefinition { displayName: string; simcName: string; type: ExpressionType; } /** * Extracts access parts from a parser context. * Always splits on dots, so "buff.foo.up" becomes ["buff", "foo", "up"]. * This is written in a flat, explicit, and typesafe way for clarity. */ export declare function extractAccessParts(context: ParserRuleContext): string[]; /** * Returns the .text of the first non-undefined result from the provided field getter functions. * Usage: getFirstFieldText(ctx, ctx.OP_GT, ctx.OP_LT, ctx.OP_GE, ctx.OP_LE) */ export declare function getFirstFieldText(...getters: Array<() => { text: string; } | undefined>): string | undefined; //# sourceMappingURL=fieldUtils.d.ts.map