Module registry

Module registry 

Source
Expand description

Type registry for tracking user-defined types during parsing.

The registry stores type definitions discovered during the discovery pass and provides lookup during parsing and code generation. It supports:

  • Primitives: Nat, Int, Text, Bool (built-in)
  • Structs: Named records with typed fields
  • Enums: Sum types with variants (unit or tuple)
  • Generics: Parameterized types (List of T, Pair of T and U)

The registry is populated by super::DiscoveryPass before main parsing begins.

Structs§

FieldDef
Field definition within a struct
TypeRegistry
VariantDef
Phase 33: Variant definition for sum types

Enums§

FieldType
Type reference for struct fields (avoids circular deps with ast::TypeExpr)
TypeDef