import type { AstNode, AstNodeBase, BattleScriptTransformerOptions, CallExpressionNode, ExpressionUnion, FunctionDeclarationNode, FunctionDefinitionNode, MiniAstJson } from "@/types";
import { BattleScriptFromAST } from "@/services/fullAst/BattleScriptFromAST";
export type IndexRetrievalFunction = () => number | null;
export type UnprocessedMiniAstNode = {
    node: AstNode;
    arr: (IndexRetrievalFunction | number | null)[];
    childArr: AstNode[];
    metaArr: number[];
};
export declare class BattleScriptToMiniAST {
    _options: BattleScriptTransformerOptions;
    _filePath: string;
    _sourceCode: string;
    _stringTable: string[];
    _moduleTable: string[];
    _astArr: UnprocessedMiniAstNode[];
    _functionLookup: Record<string, FunctionDeclarationNode | FunctionDefinitionNode>;
    _symbolLookup: Record<string, number>;
    nodeResolver: BattleScriptFromAST;
    constructor(filePath: string, sourceCode: string);
    filePath: (newFilePath?: string) => void;
    sourceCode: (newSourceCode?: string) => void;
    getNodeEntry: (node: AstNode | AstNodeBase) => UnprocessedMiniAstNode | undefined;
    getNodeEntryIndex: (node: AstNode | AstNodeBase) => number;
    registerNode: (node: AstNode) => UnprocessedMiniAstNode;
    /**
     * Moves an item in an array from one index to another.
     *
     * @param arr The array containing the item to move.
     * @param fromIndex The index of the item to move.
     * @param toIndex The index to move the item to.
     * @return Does not return a value. The array is modified in place.
     */
    moveItem<ArrayItemType>(arr: ArrayItemType[], fromIndex: number, toIndex: number): void;
    /**
     * Loops the ast array we've built up and finds nodes that have childArr entries.
     * Takes each child entry and moves the entry in the array such that all childArr
     * entries are contiguous. This allows the final output process to locate the
     * index of the first child and encode a length such that any number of child
     * entries can be encoded as two integers e.g. [2, 5] means start at index 2 and
     * read 5 nodes.
     */
    reorderNodes(): void;
    newNode: (node: AstNode, fn: () => UnprocessedMiniAstNode["arr"]) => UnprocessedMiniAstNode;
    rawBool(bool: boolean): number;
    rawInt(int: number): number;
    rawFloat(float: number): number;
    rawNull(val: null): null;
    rawUndefined(val: undefined): null;
    pointerKind(str: string): number;
    pointerOperator(str: string): number;
    pointerType(str: string): number;
    pointerString(str: string): number;
    pointerNode: (node?: AstNode | null) => IndexRetrievalFunction;
    pointerNodeList(parentNode: AstNode, providedNodeArr?: AstNode[] | null): [IndexRetrievalFunction, IndexRetrievalFunction];
    /**
     * Gets the module index for a given module path.
     * If the module path is not in the table, it adds it.
     * @param modulePath The file path of the module
     * @returns The index into the module table
     */
    getModuleIndex: (modulePath?: string) => number;
    metaIndex: (node: AstNodeBase, options?: any) => null | undefined;
    registerChildNodes: (parentNode: AstNode, childArr: AstNode[]) => void;
    resolveFunctionArgs: (functionName: string, node: CallExpressionNode) => ExpressionUnion[];
    /**
     * This is the entry point for the class and does the work of encoding the
     * full AST down to the mini-AST, then returning it.
     * @param node The root node of the AST.
     * @param options
     */
    transform: (node: AstNode, options?: BattleScriptTransformerOptions) => MiniAstJson;
    visit: (node: AstNode | AstNode[], options: BattleScriptTransformerOptions) => UnprocessedMiniAstNode[];
    visitAutoGen: (node: AstNode, options: BattleScriptTransformerOptions) => UnprocessedMiniAstNode;
    generateLayoutData(node: AstNode): UnprocessedMiniAstNode["arr"];
    visitCallExpression(node: CallExpressionNode, options?: BattleScriptTransformerOptions): UnprocessedMiniAstNode;
    visitFunctionDeclaration(node: FunctionDeclarationNode, options: BattleScriptTransformerOptions): UnprocessedMiniAstNode;
    visitFunctionDefinition(node: FunctionDefinitionNode, options: BattleScriptTransformerOptions): UnprocessedMiniAstNode;
}
//# sourceMappingURL=BattleScriptToMiniAST.d.ts.map