Trait flexi_parse::Parser

source ·
pub trait Parser: Sized {
    type Output;

    // Required method
    fn parse(self, tokens: TokenStream) -> Result<Self::Output>;
}
Expand description

A parser that can parse a stream of tokens into a syntax tree node.

Required Associated Types§

source

type Output

The return type of this parser.

Required Methods§

source

fn parse(self, tokens: TokenStream) -> Result<Self::Output>

Parses a tokenstream into the relevant syntax tree node.

Implementors§

source§

impl<F: FnOnce(ParseStream<'_>) -> Result<T>, T> Parser for F

§

type Output = T