fn nodes_of_kind(document: &Document, kind: NodeKind) -> Vec<NodeId>Expand description
Collect the ids of every node of kind in document order. nodes()
iterates the arena by ascending [mos_core::NodeId] (allocation
order), and the lowerer allocates nodes in source order, so the
result is stable document order regardless of nesting depth. Shared
by figure numbering and section_order so both passes agree on
what “document order” means.