Skip to main content

Parse

Trait Parse 

Source
pub trait Parse<'t> {
    type Prec: Copy + Default;

    // Required method
    fn parse(p: &mut Parser<'t>, _level: Self::Prec) -> PResult<Self>
       where Self: Sized;
}

Required Associated Types§

Required Methods§

Source

fn parse(p: &mut Parser<'t>, _level: Self::Prec) -> PResult<Self>
where Self: Sized,

Implementations on Foreign Types§

Source§

impl<'t> Parse<'t> for Expr

Source§

fn parse(p: &mut Parser<'t>, level: usize) -> PResult<Self>

Parses an Expression.

The level parameter indicates the operator binding level of the expression.

Source§

type Prec = usize

Source§

impl<'t> Parse<'t> for Pat

Source§

type Prec = Prec

Source§

fn parse(p: &mut Parser<'t>, level: Prec) -> PResult<Self>

Source§

impl<'t> Parse<'t> for Use

Source§

type Prec = ()

Source§

fn parse(p: &mut Parser<'t>, _level: Self::Prec) -> PResult<Self>

Source§

impl<'t> Parse<'t> for Literal

Source§

type Prec = ()

Source§

fn parse(p: &mut Parser<'t>, _level: ()) -> PResult<Self>

Source§

impl<'t> Parse<'t> for Bind

Source§

type Prec = ()

Source§

fn parse(p: &mut Parser<'t>, _level: Self::Prec) -> PResult<Self>

Source§

impl<'t> Parse<'t> for MakeArm

Source§

type Prec = ()

Source§

fn parse(p: &mut Parser<'t>, _level: ()) -> PResult<Self>

Source§

impl<'t> Parse<'t> for Match

Parses a match expression

match scrutinee {
    (Pat => Expr),*
}
Source§

type Prec = ()

Source§

fn parse(p: &mut Parser<'t>, _level: Self::Prec) -> PResult<Self>
where Self: Sized,

Source§

impl<'t> Parse<'t> for MatchArm

Source§

type Prec = ()

Source§

fn parse(p: &mut Parser<'t>, _level: Self::Prec) -> PResult<Self>
where Self: Sized,

Source§

impl<'t> Parse<'t> for Path

Source§

type Prec = ()

Source§

fn parse(p: &mut Parser<'t>, _level: Self::Prec) -> PResult<Self>

Source§

impl<'t, P: Parse<'t> + Annotation> Parse<'t> for At<P>

Source§

type Prec = <P as Parse<'t>>::Prec

Source§

fn parse(p: &mut Parser<'t>, level: P::Prec) -> PResult<Self>
where Self: Sized,

Source§

impl<'t, P: Parse<'t>> Parse<'t> for Box<P>

Source§

type Prec = <P as Parse<'t>>::Prec

Source§

fn parse(p: &mut Parser<'t>, level: P::Prec) -> PResult<Self>
where Self: Sized,

Implementors§