[][src]Macro combinedfun::parser

macro_rules! parser {
    (<$i:ty, $o:ty, $e:ty> + $lt:tt) => { ... };
    (<$i:ty, $o:ty, $e:ty>) => { ... };
}

The parser macro allows you to easily write the type of a parser in a return position, using impl Trait.

There are two ways to use it (I being the input, O the output and E the error type):

  • parser!(<I, O, E>) yields Parser<impl ParserImpl<I, Output = O, Error = E>>
  • parser!(<I, O, E> + 'a) yields Parser<impl ParserImpl<I, Output = O, Error = E> + 'a>