import { LocationRange } from "../ast/types.js"; import { AnyExpressionIR, IR, IRByKind, ProgramIR } from "../compiler/types.js"; import { Env } from "../dists/env.js"; import { IRuntimeError } from "../errors/IError.js"; import { PRNG } from "../rng/index.js"; import { Value } from "../value/index.js"; import { VDict } from "../value/VDict.js"; import { FrameStack } from "./FrameStack.js"; import { Lambda } from "./lambda/index.js"; import { RunProfile } from "./RunProfile.js"; import { Stack } from "./Stack.js"; type IRValue = IRByKind["value"]; export type RunOutput = { result: Value; bindings: VDict; exports: VDict; profile: RunProfile | undefined; }; type EvaluateAllKinds = { [Kind in Exclude as `evaluate${Kind}`]: (irValue: IRValue, location: LocationRange) => Kind extends "Assign" ? void : Value; }; export declare class Reducer implements EvaluateAllKinds { readonly environment: Readonly; readonly stack: Stack; readonly frameStack: FrameStack; readonly rng: PRNG; private isRunning; profile: RunProfile | undefined; constructor(environment: Env); evaluate(ir: ProgramIR): RunOutput; evaluateExpression(ir: AnyExpressionIR): Value; private runtimeError; errorFromException(e: unknown, location?: LocationRange): IRuntimeError; evaluateBlock(irValue: IRValue<"Block">): Value; evaluateArray(irValue: IRValue<"Array">): import("../value/VArray.js").VArray; evaluateDict(irValue: IRValue<"Dict">): VDict; evaluateAssign(irValue: IRValue<"Assign">): void; evaluateStackRef(irValue: IRValue<"StackRef">): Value; private getCapture; evaluateCaptureRef(id: IRValue<"CaptureRef">): Value; evaluateValue(value: Value): Value; evaluateTernary(irValue: IRValue<"Ternary">): Value; evaluateLambda(irValue: IRValue<"Lambda">): import("../value/vLambda.js").VLambda; evaluateCall(irValue: IRValue<"Call">, location: LocationRange): Value; call(lambda: Lambda, args: Value[], location?: LocationRange): Value; } export {}; //# sourceMappingURL=Reducer.d.ts.map