import { NodeIdentifier } from "../analysis/NodeIdentifier.js"; import { NodeIdentifierDefinition } from "../analysis/NodeIdentifierDefinition.js"; import { LocationRange } from "../ast/types.js"; import { Bindings } from "../reducer/Stack.js"; import { Value } from "../value/index.js"; import { IRByKind, Ref } from "./types.js"; type Scope = { stack: Map; } & ({ type: "block"; } | { type: "function"; captures: Ref[]; captureIndex: Map; }); export declare class CompileContext { stdlib: Bindings; imports: Record; scopes: Scope[]; constructor(stdlib: Bindings, imports: Record); startScope(): void; finishScope(): void; startFunctionScope(): void; currentScopeCaptures(): Ref[]; defineLocal(name: NodeIdentifierDefinition): void; private resolveNameFromDepth; resolveIdentifier(identifier: NodeIdentifier): IRByKind<"StackRef" | "CaptureRef" | "Value">; resolveBuiltin(location: LocationRange, name: string): IRByKind<"Value">; } export {}; //# sourceMappingURL=context.d.ts.map