yameru v0.1.0 Yameru.Parser.IndentLevel

parse indents

One indent is just 4 spaces (" "). Indents are it’s repitiion of level time.

This uses state.context.level field to store level.

Link to this section Summary

Functions

Creates block parser lazily

Decrements indent level

Gets current indent level

Increments indent level

Discards indents

Sets indent level

Link to this section Functions

Link to this function block(module, function, args)
block(module(), atom(), [term()]) :: Pelecanus.parser()

Creates block parser lazily.

This calls Pelecanus.Util.lazy/3 with given arguments, in +1 indents level.

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

Decrements indent level.

Link to this function get_level(state)
get_level(Pelecanus.state()) :: non_neg_integer()

Gets current indent level.

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

Increments indent level.

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

Discards indents.

Sets indent level.