/** * Builds a symbol table from a Dvala AST. * * Walks the AST collecting definitions (let bindings, function params, handler * clause params, for/match bindings) and references (every Sym node). Maintains * a static scope stack for symbol resolution — references are linked to the * nearest enclosing definition, or flagged as unresolved. * * Modeled on getUndefinedSymbols but instead of returning a set of names, * produces full SymbolDef[] and SymbolRef[] with source locations. */ import type { AstNode, SourceMap } from '../parser/types'; import type { ScopeRange, SymbolDef, SymbolRef } from './types'; /** * Build a symbol table from AST nodes. * Returns all definitions and references found, with resolved cross-references. */ export declare function buildSymbolTable(nodes: AstNode[], sourceMap: SourceMap | undefined, filePath: string, builtinNames: Set): { definitions: SymbolDef[]; references: SymbolRef[]; scopeRanges: ScopeRange[]; };