Skip to main content

Module plan

Module plan 

Source
Expand description

Total, verified layout plan: a coverage-checked projection from document::EureDocument to source::SourceDocument. Total, verified layout plan for projecting an [EureDocument] to [SourceDocument].

A [LayoutPlan] owns the document and assigns every reachable node an explicit emission shape ([Form] for non-Array nodes, [ArrayForm] for Array nodes). Validation runs in [PlanBuilder::build]; [LayoutPlan::emit] consumes the plan and produces a [SourceDocument] without any silent fallbacks.

Compared to the previous DocLayout best-effort projection, this module:

  • Totality: every reachable [NodeId] is assigned a shape.
  • Explicit errors: all failure cases are typed [PlanError] variants.
  • Orthogonal arrays: array handling is a separate dimension from shape, so every grammar pattern (items[] = v, items[] { ... }, @ items[], @ items[] { ... }, etc.) is reachable.

Modules§

emit
Emission of a crate::source::SourceDocument from a validated LayoutPlan.
traverse
Reachable-node traversal helpers for a [LayoutPlan].

Structs§

LayoutPlan
A declarative, validated layout plan for a document.
PlanBuilder
Mutable builder for a LayoutPlan.

Enums§

ArrayForm
How an NodeValue::Array node is emitted. Orthogonal to Form.
ArrayFormReason
Reason an ArrayForm assignment is incompatible with the array content.
Form
One of the seven semantic shapes a non-Array node can take.
PlanError
Errors produced during plan validation or construction.