Skip to main content

Module layout_policy

Module layout_policy 

Source
Expand description

Runtime LayoutPolicy for the put-direction of the parse / emit lens; carries whitespace and indentation conventions. Runtime LayoutPolicy for the parse / decorate / emit lens.

LayoutPolicy is a renamed re-export of FormatPolicy — the same configuration that the de-novo emitter consumes. Naming aligns with the put-direction terminology of the parse / decorate / emit lens: parsing erases layout; decorate puts it back; the policy is the put-direction complement that pins down what whitespace and indentation the put step uses when the parse-side fingerprint is absent.

Its LayoutPolicySpec projection is the wire-serialisable form embedded in TheoryTransform::AddEnrichment.

Functions§

policy_from_spec
Recover a runtime LayoutPolicy from its wire-serialisable LayoutPolicySpec.
policy_to_spec
Project a LayoutPolicy to its wire-serialisable form for embedding in TheoryTransform::AddEnrichment.

Type Aliases§

LayoutPolicy
Runtime layout policy for decorate and pretty_with_protocol.