import { AgencyNode } from "../types.js"; import { ScopeInfo, TypeCheckerContext } from "./types.js"; import { Scope } from "./scope.js"; export declare function buildScopes(ctx: TypeCheckerContext): ScopeInfo[]; /** * Process one assignment statement: validate its type, check the value * against the declared type, and add (or update) the binding in scope. * * Run in source order from walkScopeBody — the value-vs-binding check * needs the scope state as it was at this point in the program, not the * final state after all declarations. */ export declare function declareVariable(node: AgencyNode, scope: Scope, ctx: TypeCheckerContext): void; /** * The value-vs-target type checks for an assignment, factored out of * `declareVariable` so they can run in the flow-aware Phase B pass * (`checkAssignmentsInScope`) rather than during scope declaration. Pure * checking — no declaration. No-op for non-assignments. */ export declare function checkAssignmentValue(node: AgencyNode, scope: Scope, ctx: TypeCheckerContext): void; /** * Walk a body of statements and declare every binding into the given scope. * Recurses into nested blocks using the same scope, which preserves today's * function-scoped semantics — declarations leak out of nested blocks. */ export declare function walkScopeBody(nodes: AgencyNode[], scope: Scope, ctx: TypeCheckerContext): void;