Macro pear::parse

source ·
macro_rules! parse {
    ($parser:ident : &mut $e:expr) => { ... };
    ($parser:ident : $e:expr) => { ... };
    ($parser:ident ($($x:expr),*) : $e:expr) => { ... };
}
Expand description

Runs the parser with the given name and input, then [parsers::eof()].

Returns the combined result.

Syntax:

parse := PARSER_NAME ( '(' (EXPR ',')* ')' )? ':' INPUT_EXPR

PARSER_NAME := rust identifier to parser function
INPUT_EXPR := any valid rust expression which resolves to a mutable
              reference to type that implements `Input`