Expand description
The LGX template vocabulary the editor completes and paints with.
A View: / Head: body is HTML whose {…} groups are either a TAG — {if c:},
{for each x in xs:}, {end} — or a HOLE: a LOGOS expression, optionally piped through
filters ({price | money}). The template parser in logicaffeine_language::lgx::template owns
the grammar; this module holds the two things an editor needs from it, once: the phrase that
opens each tag (with the shape MalformedTag teaches), and the clause words inside a tag.
Constants§
- FOR_
EACH_ CLAUSES - The clause words a
{for each …:}tag carries after its pattern. - TAGS
- Every template tag: the phrase that opens it, and its shape as
MalformedTagspells it.
Functions§
- filter_
pipes - The byte ranges of
text’s top-level|separators — the filter pipes of a hole. A|inside a string or a bracketed group is part of an expression, not a pipe. - is_
comment - A
{# … #}template comment. - tag_
phrase - The tag phrase
inner(a{…}group’s text, braces excluded) opens with, and the byte length of the phrase withininnerincluding any leading whitespace —Nonefor a hole.