View Source Liquex.Parser.Tag (liquex v0.13.0)

Helper methods for parsing tags

Summary

Functions

Read to end of a line within a liquid tag. Reads to end of line ("\r" and/or "\n") or to a closing tag "%}".

Parse basic tag with no arguments

Functions

Link to this function

close_tag(combinator \\ empty())

View Source
@spec close_tag(NimbleParsec.t()) :: NimbleParsec.t()

Parse close tags

Examples

* "%}"
* "-%} "
Link to this function

end_liquid_line(combinator \\ empty())

View Source
@spec end_liquid_line(NimbleParsec.t()) :: NimbleParsec.t()

Read to end of a line within a liquid tag. Reads to end of line ("\r" and/or "\n") or to a closing tag "%}".

Link to this function

expression_tag(combinator \\ empty(), tag_name)

View Source
@spec expression_tag(NimbleParsec.t(), String.t()) :: NimbleParsec.t()

Parse tag with no expression

Examples

* "{% if a == 5 %}"
* "{% elsif b >= 10 and a < 4 %}"
Link to this function

liquid_tag_directive(combinator \\ empty(), name)

View Source
@spec liquid_tag_directive(NimbleParsec.t(), String.t()) :: NimbleParsec.t()
Link to this function

liquid_tag_expression(combinator \\ empty(), tag_name)

View Source
Link to this function

open_tag(combinator \\ empty())

View Source
@spec open_tag(NimbleParsec.t()) :: NimbleParsec.t()

Parse open tags

Examples

* "{%"
* "{%-"
Link to this function

tag_directive(combinator \\ empty(), name)

View Source
@spec tag_directive(NimbleParsec.t(), String.t()) :: NimbleParsec.t()

Parse basic tag with no arguments

Examples

* "{% break %}"
* "{% endfor %}"