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

Helper parsers for parsing literal values in Liquid

Summary

Functions

Parses not line breaking white space, given a minimum.

Parses a single or double quoted string.

Parses everything outside of the Liquid tags. We call this text but it's any unstructed data not specifically parsed by Liquex.

Parses white space, given a minimum.

Functions

Link to this function

literal(combinator \\ empty())

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

Parses a literal

Examples

* "true"
* "false"
* "nil"
* "3.14"
* "3"
* "'Hello World!'"
* ""Hello World!""
Link to this function

non_breaking_whitespace(combinator \\ empty(), min \\ 0)

View Source
@spec non_breaking_whitespace(NimbleParsec.t(), non_neg_integer()) :: NimbleParsec.t()

Parses not line breaking white space, given a minimum.

Examples

* "  "
* " "

Parses a single or double quoted string.

Strings may have escaped quotes within them.

Examples

Examples here include the quotes as given, as opposed to other examples.

* "Hello World"
* 'Hello World'
* "Hello "World""
* 'Hello "World"'
* 'Hello 'World''
Link to this function

range(combinator \\ empty())

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

Parses a range

Examples

* "(1..5)"
* "(1..num)"
Link to this function

text(combinator \\ empty())

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

Parses everything outside of the Liquid tags. We call this text but it's any unstructed data not specifically parsed by Liquex.

Link to this function

whitespace(combinator \\ empty(), min \\ 0)

View Source
@spec whitespace(NimbleParsec.t(), non_neg_integer()) :: NimbleParsec.t()

Parses white space, given a minimum.

Examples

* "  "
* "
"