Lavash.Sigil (Lavash v0.3.0-rc.3)

Copy Markdown View Source

The ~L sigil for Lavash HEEx templates.

Used inside render fn assigns -> ~L"""...""" end to mark templates for Lavash processing. The sigil itself is a no-op — template compilation is handled by the transformer pipeline (TokenizeTemplate → AnalyzeTemplate → ExtractColocatedJs → CompileComponent/CompileLiveView).

The sigil exists so that:

  1. Editors can provide HEEx syntax highlighting
  2. Macro.escape captures a {:sigil_L, meta, ...} AST node that TokenizeTemplate pattern-matches to extract the template source

Summary

Functions

Marks a HEEx template for Lavash processing.

Functions

sigil_L(arg, modifiers)

(macro)

Marks a HEEx template for Lavash processing.

This macro is a no-op — it returns the compiled HEEx as-is. The actual Lavash template processing (attribute injection, JS generation, etc.) happens in the Spark transformer pipeline, not in the sigil.