Expand description
Document order over the chart IR.
The IR keeps every ordered collection (children, transitions, targets, executable content
blocks) in source order, so document order is a pre-order walk of the tree. The walk visits a
state, then its <initial> transition, its onentry and onexit blocks, its transitions
(each followed by its content), its invokes’ finalize blocks, and finally its child states.
Positions are the indices of the returned sequence.
States alone keep the same relative order in the compiled chart, whose dense state indices are document positions restricted to states.
Enums§
- DocNode
- A node visited by the document-order walk.
Functions§
- document_
order - Every state, transition and executable content element of
chartin document order; the position of a node is its index in the result. - same_
chart - Structural chart equality: every node, attribute, expression text, extension node and
document order is compared, source locations are not (a
crate::ir::Spanequals every other span). Two charts are equal exactly when every surface serializes them identically. - state_
order - The document position of every state, in the same pre-order as
document_order. The result lists state identifiers; a state’s position is its index.