Skip to main content

Module first_pass

Module first_pass 

Source
Expand description

Two-phase first pass over the oxc AST to build the IR.

  • Phase 1 (collect): Collect all type names into the TypeRegistry.
  • Phase 2 (populate): Fully populate IR declarations using the registry for resolution.
  • converters: Pure AST → IR conversion functions shared by both phases.

Modules§

converters
Individual declaration converters: AST → IR.

Functions§

collect_type_names
Walk the AST and collect all type names into the registry and scope arena.
is_module
Detect whether a file is a TypeScript “script” or “module”.
populate_declarations
Walk the AST again and fully populate the IR declarations.