Layer-1 template analysis: collects compile-time validation data from the already-parsed template tree.
Reads :lavash_template_tokens (the parser tree produced by
TokenizeTemplate) and walks it to extract:
:lavash_template_phx_events— everyphx-click,phx-submit,phx-mouseenter, etc. occurrence (with static-string event names) grouped per node alongside the same node'sphx-value-*attribute keys.ValidateTemplatecross-checks each event name against declared actions and each phx-value key against the actions' params.:lavash_template_assign_refs— every@namereference anywhere an Elixir expression appears in HEEx (inline{@x}, attrclass={@x},<%= @x %>,:if={@x}, etc.).ValidateTemplatechecks each against the declared state / props / slots / calculations / etc.
What this transformer does NOT do
Layer-4 (optimism) work — extracting subtree derives, attr
derives, and injecting data-lavash-html attrs — lives in
Lavash.Optimistic.Transformers.AnalyzeOptimisticTemplate, which
runs after this transformer. Per docs/ARCHITECTURE.md
punchlist item #4, the two were split so layer-1 consumers
don't pay for layer-4 analysis.
Summary
Functions
Callback implementation for Spark.Dsl.Transformer.after?/1.
Callback implementation for Spark.Dsl.Transformer.after_compile?/0.
Callback implementation for Spark.Dsl.Transformer.before?/1.
Callback implementation for Spark.Dsl.Transformer.transform/1.
Functions
Callback implementation for Spark.Dsl.Transformer.after?/1.
Callback implementation for Spark.Dsl.Transformer.after_compile?/0.
Callback implementation for Spark.Dsl.Transformer.before?/1.
Callback implementation for Spark.Dsl.Transformer.transform/1.