pub fn expl3_unit(
elements: &[SyntaxElement],
head_idx: usize,
) -> Option<Expl3Unit>Expand description
Resolve the expl3 call unit headed by elements[head_idx], or None when the
shape scan cannot (an unrecognized head, a slot facing the wrong shape, a
docstrip guard mid-unit, or the stream ending mid-unit) — exactly the
conditions under which segment_expl_statements degrades that statement to
the fallback.
Public so the formatter can ask about one head directly, without a
StatementMap: the conditional layout runs inside a command’s attached
arguments too, where there are no statements to segment.