Skip to main content

Module expr_typing

Module expr_typing 

Source
Expand description

Expression typer — re-export shim.

The Fase 3 expression typer — the pass that walks an ast::Expr tree and assigns a concrete DataType to every node (type_expr, TypedExpr, TypedExprKind, TypeError, Scope) — was re-homed into the reddb-io-rql language front-end crate (#1105, ADR 0053). It consumes the canonical AST that already lives there (#1113) and types it through the cast and function catalogs in reddb-io-types, so the crate graph stays acyclic — no reddb-io-rql -> reddb-server back-edge.

This shim preserves the historical crate::storage::query::expr_typing::* import path so every call-site across the workspace keeps resolving unchanged. A byte-faithful move with zero call-site edits.

Structs§

TypedExpr
Resolved type for an expression node. Mirrors Expr shape with an added ty slot. Span is preserved so analyzer diagnostics can still point at the original token range.

Enums§

TypeError
Errors reported by the expression typer. All variants are recoverable diagnostics — the analyzer can collect several and emit them together rather than fail-fast like the parser.
TypedExprKind

Traits§

Scope
Closure-based column scope. The analyzer passes a closure that resolves (table, column) to a DataType, returning None if the column doesn’t exist in the active scope. Callers wire this to the schema registry (production) or a static map (tests).

Functions§

type_expr
Type a single expression against the given scope.