import { LocationRange } from "../ast/types.js"; import { Value } from "../value/index.js"; export type LambdaIRParameter = { name: string; annotation: AnyExpressionIR | undefined; }; type MakeIRContent = { kind: Kind; value: Payload; }; export type IRContent = MakeIRContent<"Program", { statements: StatementIR[]; result: AnyExpressionIR | undefined; exports: string[]; bindings: Record; }> | MakeIRContent<"Assign", { left: string; right: AnyExpressionIR; }> | MakeIRContent<"Block", { statements: StatementIR[]; result: AnyExpressionIR; }> | MakeIRContent<"StackRef", number> | MakeIRContent<"CaptureRef", number> | MakeIRContent<"Ternary", { condition: AnyExpressionIR; ifTrue: AnyExpressionIR; ifFalse: AnyExpressionIR; }> | MakeIRContent<"Call", { fn: AnyExpressionIR; args: AnyExpressionIR[]; as: "call" | "decorate"; }> | MakeIRContent<"Lambda", { name?: string; captures: Ref[]; parameters: LambdaIRParameter[]; body: AnyExpressionIR; }> | MakeIRContent<"Array", AnyExpressionIR[]> | MakeIRContent<"Dict", [AnyExpressionIR, AnyExpressionIR][]> | MakeIRContent<"Value", Value>; export type IRContentByKind = Extract; export type AnyExpressionIRContent = Exclude; export type Ref = IRContentByKind<"StackRef" | "CaptureRef">; export type IR = IRContent & { location: LocationRange; }; export type IRByKind = Extract; export type AnyExpressionIR = Exclude; export type StatementIR = IRByKind<"Assign">; export type ProgramIR = IRByKind<"Program">; export declare const eCall: (fn: AnyExpressionIR, args: AnyExpressionIR[], as?: "call" | "decorate") => IRContentByKind<"Call">; export declare function make(kind: Kind, value: IRContentByKind["value"]): IRContentByKind; export {}; //# sourceMappingURL=types.d.ts.map