import type { TypeExpr } from "../ast/types.js"; import type { Definition } from "../ast/nodes.js"; import { type DuplicateDefinitionError } from "../errors/structured-errors.js"; export type SymbolKind = "function" | "param" | "let" | "const" | "type" | "record" | "enum" | "import" | "result" | "tool"; export interface SymbolInfo { name: string; kind: SymbolKind; nodeId: string | null; type?: TypeExpr; definition?: Definition; } export declare class Scope { private symbols; private parent; constructor(parent?: Scope | null); /** * Define a symbol in this scope. * Returns a DuplicateDefinitionError if the name already exists in THIS scope. */ define(name: string, info: SymbolInfo): DuplicateDefinitionError | null; /** * Look up a symbol by walking the scope chain (current → parent → …). */ lookup(name: string): SymbolInfo | undefined; /** * Collect all names visible from this scope (for Levenshtein suggestions). */ allNames(): string[]; /** * Create a child scope that inherits from this one. */ child(): Scope; } //# sourceMappingURL=scope.d.ts.map