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::SourceDocumentfrom a validatedLayoutPlan. - traverse
- Reachable-node traversal helpers for a [
LayoutPlan].
Structs§
- Layout
Plan - A declarative, validated layout plan for a document.
- Plan
Builder - Mutable builder for a
LayoutPlan.
Enums§
- Array
Form - How an
NodeValue::Arraynode is emitted. Orthogonal toForm. - Array
Form Reason - Reason an
ArrayFormassignment is incompatible with the array content. - Form
- One of the seven semantic shapes a non-Array node can take.
- Plan
Error - Errors produced during plan validation or construction.