Trait Parser

Source
pub trait Parser<T> {
    type Precedence: Ord;
    type Delimiter: Delimiter;
    type BinaryOperator;
    type UnaryOperator;
    type Term;
    type Error;

    // Required method
    fn parse_token(
        &self,
        kind: T,
    ) -> Result<ParserElement<Self, T>, Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn parse_token(&self, kind: T) -> Result<ParserElement<Self, T>, Self::Error>

Implementations on Foreign Types§

Source§

impl<P, T> Parser<T> for &P
where P: Parser<T> + ?Sized,

Source§

type Precedence = <P as Parser<T>>::Precedence

Source§

type Delimiter = <P as Parser<T>>::Delimiter

Source§

type BinaryOperator = <P as Parser<T>>::BinaryOperator

Source§

type UnaryOperator = <P as Parser<T>>::UnaryOperator

Source§

type Term = <P as Parser<T>>::Term

Source§

type Error = <P as Parser<T>>::Error

Source§

fn parse_token(&self, kind: T) -> Result<ParserElement<Self, T>, Self::Error>

Implementors§