View Source Liquex.Parser.Literal (liquex v0.13.0)
Helper parsers for parsing literal values in Liquid
Summary
Functions
Parses a literal
Parses not line breaking white space, given a minimum.
Parses a single or double quoted string.
Parses a range
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
@spec literal(NimbleParsec.t()) :: NimbleParsec.t()
Parses a literal
Examples
* "true"
* "false"
* "nil"
* "3.14"
* "3"
* "'Hello World!'"
* ""Hello World!""
@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''
@spec range(NimbleParsec.t()) :: NimbleParsec.t()
Parses a range
Examples
* "(1..5)"
* "(1..num)"
@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.
@spec whitespace(NimbleParsec.t(), non_neg_integer()) :: NimbleParsec.t()
Parses white space, given a minimum.
Examples
* " "
* "
"