/**
 * BattleScript Interpreter - TypeScript Implementation
 *
 * This is a TypeScript port of the C++ BattleScript interpreter that executes
 * binary compiled from the BattleScript language.
 */
declare enum AstFieldWidth {
    U8 = "U8",
    U16 = "U16",
    U32 = "U32"
}
type NativeBridgeFunction = (args: any[]) => any;
interface CapturedClosure {
    nodeIndex: number;
    context: Record<string, any>;
}
declare class InterpreterBinaryFrame {
    parent: InterpreterBinaryFrame | null;
    returnValueTarget: any | null;
    nodeIndex: number;
    getValueFromContextStack: boolean;
    state: number;
    fieldIndex: number;
    bodyIndex: number;
    boolData: boolean;
    name: any;
    value: any;
    left: any;
    right: any;
    other: any;
    result: any;
    resolvedArgs: any[];
    resolvedOther: any[];
    didReturn: boolean;
}
interface MiniAstBinaryResult {
    ast8: Uint8Array;
    ast16: Uint16Array;
    ast32: Uint32Array;
    fieldWidth: AstFieldWidth;
    stringTable: string[];
    meta: any;
    stateDefinitions: any[];
}
declare class InterpreterAstMin {
    ast8: Uint8Array;
    ast16: Uint16Array;
    ast32: Uint32Array;
    fieldWidth: AstFieldWidth;
    stringTable: string[];
    meta: any;
    stateDefinitions: any[];
    private variables;
    private nativeFunctions;
    private nativeLibraries;
    private eventHandlers;
    private timerIds;
    init(): void;
    setBinary(binary: MiniAstBinaryResult): void;
    handleEvent(stateName: string, eventName: string, eventData: any): void;
    callScriptFunction(functionBlock: any, resolvedArgs: any[]): any;
    defineVariable(path: string, value: any): void;
    setVariable(path: string, value: any): void;
    getVariable(path: string): any;
    getField(nodeIndex: number, fieldIndex: number): number | null;
    requireField(nodeIndex: number, fieldIndex: number): number;
    getFieldCount(nodeIndex: number): number;
    private getAstSize;
    resolveNode(nodeIndex: number): any;
    runProgram(): any;
    executeClosure(closure: CapturedClosure, content?: Record<string, any>): void;
    pushNodeToExecutionStack(stack: InterpreterBinaryFrame[], parent: InterpreterBinaryFrame | null, result: any | null, nodeIndex: number, getValueFromContextStack?: boolean): void;
    processNodeIndexPointer(stack: InterpreterBinaryFrame[], parent: InterpreterBinaryFrame | null, result: any | null, nodeIndex: number, fieldIndex: number, isOptional?: boolean, getValueFromContextStack?: boolean): boolean;
    lookupOperatorIndexPointer(result: any | null, nodeIndex: number, fieldIndex: number, isOptional?: boolean, getValueFromContextStack?: boolean): boolean;
    lookupStringIndexPointer(result: any | null, nodeIndex: number, fieldIndex: number, isOptional?: boolean, getValueFromContextStack?: boolean): boolean;
    processTypeIndexPointer(result: any | null, nodeIndex: number, fieldIndex: number, isOptional?: boolean, getValueFromContextStack?: boolean): boolean;
    processNodeIndexPointerList(stack: InterpreterBinaryFrame[], parent: InterpreterBinaryFrame | null, result: any | null, frame: InterpreterBinaryFrame, startField: number, countField: number, exitState: number, getValueFromContextStack?: boolean, resetBodyIndex?: boolean): boolean;
    processArgsIndexPointerList(stack: InterpreterBinaryFrame[], parent: InterpreterBinaryFrame | null, resultName: any | null, resultValue: any | null, frame: InterpreterBinaryFrame, startField: number, countField: number, exitState: number, resetBodyIndex?: boolean): boolean;
    processRawBool(result: any | null, nodeIndex: number, fieldIndex: number): boolean;
    registerNativeLibrary(moduleName: string, libraryFunctions: Record<string, NativeBridgeFunction>): void;
    registerNativeFunction(path: string, func: NativeBridgeFunction): void;
    private processFrame;
    private handleRoot;
    private handleBlockStatement;
    private handleLiteralInt;
    private handleLiteralFloat;
    private handleLiteralString;
    private handleLiteralBool;
    private handleLiteralNull;
    private handleLiteralUndefined;
    private handleIdentifier;
}
export { AstFieldWidth, InterpreterBinaryFrame, InterpreterAstMin };
//# sourceMappingURL=interpreter.d.ts.map