/** * AST to IR transformation * * Transforms the parsed AST into a typed intermediate representation. * This phase: * - Assigns types to literals * - Rewrites operators as typed function calls * - Rewrites temporal keywords as function calls * - Tracks variable types through let bindings */ import { Expr } from "./ast"; import { IRExpr } from "./ir"; import { EloType } from "./types"; /** * Type environment: maps variable names to their inferred types */ export type TypeEnv = Map; /** * Set of function names currently being defined (to detect recursion) */ type DefiningSet = Set; /** * Options for the transform function */ export interface TransformOptions { maxDepth?: number; /** * If true, allow undefined variables (for SQL where they represent column names). * If false (default), undefined variables throw an error to prevent access to host globals. */ allowUndefinedVariables?: boolean; } /** * Transform an AST expression into IR */ export declare function transform(expr: Expr, env?: TypeEnv, defining?: DefiningSet, options?: TransformOptions): IRExpr; export {}; //# sourceMappingURL=transform.d.ts.map