Skip to main content

Module decl

Module decl 

Source
Expand description

Declaration variants populated by AST→IR lowering.

This module introduces the Declaration enum with one variant per kind of named entity the engine reasons about. Each variant carries a shared DeclCommon payload (name, span, owning schema, optional parent declaration) plus a small number of variant-specific fields. The actual lowering from parser AST to these declarations, together with the registration pass (DeclTable + scope chain), lives in the sibling lowering modules.

Placeholder TypeRef payloads are narrowed into structured representations once type resolution cross-checks against the catalog.

Structs§

AnchoredType
ColumnDecl
CursorDecl
DeclCommon
Shared metadata carried by every declaration variant.
FunctionDecl
IndexDecl
PackageDecl
ParamDecl
ProcedureDecl
SequenceDecl
SynonymDecl
TableDecl
TriggerDecl
TypeDecl
VariableDecl
ViewDecl

Enums§

DeclKind
Discriminator counterpart to Declaration for fast dispatch and fact tagging without pattern-matching the full enum.
Declaration
Discriminated union of every kind of declaration the IR recognizes.
ParamMode
Direction-of-flow marker on procedure/function parameters.
TypeRef
Type reference attached to typed declarations.