Lavash.SparkHeex.Transformers.ValidateTemplate (Lavash v0.3.0-rc.1)

Copy Markdown View Source

Demonstrates the core spike value: the template is now a first-class DSL citizen, so we can cross-validate it against other DSL entities at DSL build time (i.e. inside the Spark transformer pipeline, not in a bolted-on post-compile pass).

We extract @field references from the raw HEEx source and check that each one matches a declared state :field. Unknown references raise a Spark.Error.DslError pointed at the surrounding DSL.

Summary

Functions

after?(arg1)

Callback implementation for Spark.Dsl.Transformer.after?/1.

after_compile?()

Callback implementation for Spark.Dsl.Transformer.after_compile?/0.

before?(arg1)

Callback implementation for Spark.Dsl.Transformer.before?/1.

transform(dsl_state)

Callback implementation for Spark.Dsl.Transformer.transform/1.