Hecr::Compiler::Codegen
Generates Crystal code from a template AST. The emitted code appends to
an IO variable; expressions are wrapped in #<loc:...> pragmas so
compile errors and runtime backtraces point into the template
(spike 02 / D9).
Constants
The append operator as a constant: a literal " << " inside a <<
chain trips a crystal-tool-format lexing bug, so it is assembled here.
Reserved built-in element: <content/> renders the default slot
(yield); <content {value}/> passes values to the caller's :let.
Tokens whose mangled name the styles modules expose only via
["name"]: Crystal keywords plus the conventional to_h.
Constructors
Class methods
Statements appending to an existing IO variable (Hecr.embed).
A single expression evaluating to Hecr::Safe (used by Hecr.render
and Hecr.template, and as the body of embed_templates defs).
Instance methods
When -Dhecr_annotate is set (spike 10), rendered output gains HTML
comments marking template boundaries and component call sites, like
HEEx's debug_heex_annotations — but switched by a compile flag
instead of config + forced recompile (decision D11).