ParseResult

Type Alias ParseResult 

Source
pub type ParseResult<'a, T> = Result<(T, TokenStream<'a>), ParseFailure<'a>>;
Expand description

The result value returned by the individual parsers

Parser::parse either succeeds, in which case it returns a value that was parsed and the remaining tokens in the token stream, or fails with a ParseFailure. This type alias represents the return value.

Aliased Type§

pub enum ParseResult<'a, T> {
    Ok((T, TokenStream<'a>)),
    Err(ParseFailure<'a>),
}

Variants§

§1.0.0

Ok((T, TokenStream<'a>))

Contains the success value

§1.0.0

Err(ParseFailure<'a>)

Contains the error value