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

Helper parsers for parsing literal values in Liquid

Link to this section 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.

Link to this section Functions

Link to this function

literal(combinator \\ empty())

View Source

Specs

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

Specs

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

Specs

Parses a range

Examples

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

text(combinator \\ empty())

View Source

Specs

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

Specs

Parses white space, given a minimum.

Examples

* "  "
* "
"