Hecr::Compiler::Formatter
Source formatter for the hecr dialect (hecr format).
The governing rule is HEEx's: NEVER change rendering. Children are
re-indented ("reflowed") only when every sibling is block-safe —
elements, components, EEx statements, comments, or whitespace-only
text. Any non-blank text, {...} interpolation, or <%= %> among the
children makes the whole group "tight": reproduced exactly as written
(only the inside of tags — attribute spacing — is normalized, which
HTML rendering cannot observe).
Normalizations (documented in docs/dialect.md §13): two-space indent;
special attributes print first (:if, :for, :key, :let); void and
self-closing tags print as <br />; default-slot content prints before
named slot entries; multiple blank lines collapse to one.
Constants
HEEx's inline-element list (whitespace around these renders), plus the
<content/> builtin whose substituted content is unknowable.
Constructors
Class methods
Instance methods
Children may be re-indented only when doing so cannot change rendering: no non-blank text or output expressions among them, and any INLINE element is already whitespace-separated on both sides in the source (reflow only normalizes whitespace that is already there).