Trait peel::parser::Parser [] [src]

pub trait Parser {
    type Result;
    type Variant;
    fn parse<'a>(&self,
                 input: &'a [u8],
                 node: Option<&ParserNode<Self::Result, Self::Variant>>,
                 arena: Option<&ParserArena<Self::Result, Self::Variant>>,
                 result: Option<&Vec<Self::Result>>)
                 -> IResult<&'a [u8], (Self::Result, ParserState)>; fn variant(&self) -> Self::Variant; }

The parsing trait

Associated Types

The type for result reporting, usually an enum

The type of the parser itself, usually an enum

Required Methods

Parse using nom and return the result

Return the actual enum variant of the parser

Implementors