Skip to main content

Module validate

Module validate 

Source
Expand description

Well-formedness validation and initial-state resolution.

validate checks every rule and returns all violations together, each naming the offending node; a chart that passes can be compiled with crate::compile::CompiledChart::new and run.

Structs§

ResolvedInitial
The resolved default entry of a compound state or of the root.
Violation
One well-formedness violation.

Enums§

InitialSource
Where a resolved default entry came from.
NodeRef
The node a violation is about.
ViolationKind
What is wrong.

Functions§

resolve_initial
Resolve the default entry of a state: the initial attribute, else the <initial> element’s transition, else the first child state (not a history pseudo-state) in document order.
resolve_root_initial
Resolve the default entry of the root: its initial attribute, else its first child state.
validate
Validate a chart, returning every violation found.