yameru v0.1.0 Yameru.Parser.Literal

Scalar, Block, and Tuple parser

Link to this section Summary

Functions

Parses any block in +1 indent level

Parses boolean value (yes / no)

Parses string sandwitched with double quote sign

Consumes empty (only spaces) line and replace with empty string

Parses extended iso 8601 (in Elixir can parse)

Parses number (in brackets)

Parses plain_string

Parses scalar; inline value

Parses string sandwitched with single quote sign

Parses special scalar; sandwitched with brackets

Parses tuple and scalar or block

Discards line break on the heels of given parser consumed

Link to this section Functions

Parses any block in +1 indent level.

Link to this function boolean()
boolean() :: Pelecanus.parser()

Parses boolean value (yes / no)

Link to this function double_quoted()
double_quoted() :: Pelecanus.parser()

Parses string sandwitched with double quote sign.

Link to this function empty_line()
empty_line() :: Pelecanus.parser()

Consumes empty (only spaces) line and replace with empty string.

Parses extended iso 8601 (in Elixir can parse)

Parses number (in brackets).

Note that number literal is expected to follow SI. Decimal separator is comma or period. Digit group separator is space.

Link to this function plain_string()
plain_string() :: Pelecanus.parser()

Parses plain_string.

This function don’t check that head isn’t quote sign or bracket sign.

Parses scalar; inline value.

Link to this function single_quoted()
single_quoted() :: Pelecanus.parser()

Parses string sandwitched with single quote sign.

Link to this function special()
special() :: Pelecanus.parser()

Parses special scalar; sandwitched with brackets.

Parses tuple and scalar or block.

In this parser any value is tuple. Just scalar is mapped to {scalar, nil} and just block is mapped to {nil, block}. When both exist, its are mapped to {scalar, nil}

Note that this function check that either scalar or block isn’t nil.

Link to this function with_line_end(e)
with_line_end(Pelecanus.parser()) :: Pelecanus.parser()

Discards line break on the heels of given parser consumed.