Module then

Module then 

Source
Expand description

Sequential (then) combinators for OutOf parsers.

These combinators compose parsers in order on the same In stream. They do not perform rollback by themselves.

Rollback / backtracking is provided by higher-level combinators such as:

§Interaction with cut

This crate treats cut as an explicit branch-pruning marker. If you want a successful prefix to commit, wrap it with crate::parser::ParserOnce::cut or insert crate::parser::prim::cut.

Structs§

Between
Parse left, then inner, then right, returning the inner output.
Bind
Sequential bind (flat_map).
Left
Keep the left output and discard the right output.
Map
Map the output of a parser.
Right
Parser that discards the left output and keeps the right output.
To
Replace the output of a parser with a constant value.

Functions§

between
Create a Between combinator.
bind
Create a sequential bind combinator.
left
Create a Left combinator.
map
Create a Map combinator.
right
Discard the left output and keep the right output.
then
Shorthand for sequencing two parsers and returning both outputs.
to
Create a To combinator.