pub struct LineVariantGroup {
pub scope_id: DefinitionId,
pub base: u32,
pub dims: Vec<u16>,
}Expand description
One line-variant group (stage 1 of the shared-alternatives track,
issue #3273): the record that ties dims.iter().product() consecutive
LineEntrys in a scope’s line table back to ONE authored source line
whose inline alternatives were enumerated at recognition time.
The entries themselves are ordinary whole-line entries — each with its
own source_hash and its own audio_ref, which is the point: VO is
associated per rendered line, and a translator sees whole lines. This
record exists so intl export and audio tooling can group them, and so
codegen’s combo switch and the table agree on the layout.
Layout contract: variant (i, j, …) — one branch index per authored
alternative, in source order — lives at
base + i * dims[1..].product() + j * dims[2..].product() + …
(row-major, first alternative varies slowest). dims is never empty
and every dim is ≥ 1.
Fields§
§scope_id: DefinitionIdThe scope whose ScopeLineTable holds this group’s entries.
base: u32Index of the group’s first entry in that scope’s lines.
dims: Vec<u16>Branch count per authored alternative, in source order.
Trait Implementations§
Source§impl Clone for LineVariantGroup
impl Clone for LineVariantGroup
Source§fn clone(&self) -> LineVariantGroup
fn clone(&self) -> LineVariantGroup
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more