pub enum LinePart {
Literal(String),
Slot(u8),
Select {
slot: u8,
variants: Vec<(SelectKey, String)>,
default: String,
},
Span {
name: String,
attrs: Vec<(String, String)>,
children: Vec<LinePart>,
},
}Expand description
One segment of a LineTemplate.
Variants§
Literal(String)
A literal string fragment.
Slot(u8)
A value interpolation slot (index into the evaluation stack snapshot).
Select
A plural/keyword select over a slot value.
Span
<name attr="v">…</name> — an inline markup span
(docs/prose-dialect-spec.md §4.4, issue #1716). Genuinely nested,
mirroring hir::ContentPart::Span: the decoder enforces balance
structurally, so a mangled translation (unbalanced inline codes, a
classic TMS failure) becomes a decode error, not silent rendering
corruption. children is empty for a self-closing / point-marker
span (<pause/>, <sfx name="bell"/>, §8b.11).
Hash-transparent (§4.4, RULED before any markup ships): name/
attrs never contribute to source_hash — only children’s own
text/slots do, recursively, the same way an Interpolation
contributes a "{…}" placeholder rather than its resolved value.
Hello <wave>world</wave> hashes identically to Hello world. See
brink-ir’s lir::lower::recognize — the one place that builds
this variant, and the one place hash-transparency is enforced.