Expand description
Inline type assembly pass
This module implements Phase 3 inline type resolution as specified in XSD_INLINE_TYPE_RESOLUTION_DESIGN.md. It assembles inline type definitions (TypeRefResult::Inline and inline_type fields) into arena TypeKey values.
§Overview
Inline types are anonymous type definitions that appear directly within element declarations, attribute declarations, or as base/item/member types in type derivation. These need to be allocated in the type arenas before the reference resolution phase can complete.
§Work Queue Approach
To avoid borrow conflicts and handle nested inline types, we use a two-pass work queue approach:
-
Scan Pass: Collect all inline types into
InlineTypeJobrecords. Each job records the owner component and the inline type AST (cloned). -
Assembly Pass: For each job, assemble the inline type into the arena and update the owner’s resolved_* field with the TypeKey.
Structs§
- Inline
Assembly Stats - Statistics from the inline type assembly pass
Functions§
- allocate_
content_ particle_ elements - Allocate arena element declarations for local elements in content particles.
- allocate_
model_ group_ particle_ elements - Allocate arena element declarations for local elements in named model group particles.
- assemble_
inline_ types - Assemble all inline types in the schema set
- resolve_
local_ element_ alternatives - XSD 1.1: Assemble inline
<xs:alternative>types attached to local element declarations.