[][src]Enum pest_meta_tmp::ast::Expr

pub enum Expr {
    Str(String),
    Insens(String),
    Range(StringString),
    Ident(String),
    PeekSlice(i32Option<i32>),
    PosPred(Box<Expr>),
    NegPred(Box<Expr>),
    Seq(Box<Expr>, Box<Expr>),
    Choice(Box<Expr>, Box<Expr>),
    Opt(Box<Expr>),
    Rep(Box<Expr>),
    RepOnce(Box<Expr>),
    RepExact(Box<Expr>, u32),
    RepMin(Box<Expr>, u32),
    RepMax(Box<Expr>, u32),
    RepMinMax(Box<Expr>, u32u32),
    Skip(Vec<String>),
    Push(Box<Expr>),
}

Variants

Str(String)

Matches an exact string, e.g. "a"

Insens(String)

Matches an exact string, case insensitively (ASCII only), e.g. ^"a"

Range(StringString)

Matches one character in the range, e.g. 'a'..'z'

Ident(String)

Matches the rule with the given name, e.g. a

PeekSlice(i32Option<i32>)

Matches a custom part of the stack, e.g. PEEK[..]

PosPred(Box<Expr>)

Positive lookahead; matches expression without making progress, e.g. &e

NegPred(Box<Expr>)

Negative lookahead; matches if expression doesn't match, without making progress, e.g. !e

Seq(Box<Expr>, Box<Expr>)

Matches a sequence of two expressions, e.g. e1 ~ e2

Choice(Box<Expr>, Box<Expr>)

Matches either of two expressions, e.g. e1 | e2

Opt(Box<Expr>)

Optionally matches an expression, e.g. e?

Rep(Box<Expr>)

Matches an expression zero or more times, e.g. e*

RepOnce(Box<Expr>)

Matches an expression one or more times, e.g. e+

RepExact(Box<Expr>, u32)

Matches an expression an exact number of times, e.g. e{n}

RepMin(Box<Expr>, u32)

Matches an expression at least a number of times, e.g. e{n,}

RepMax(Box<Expr>, u32)

Matches an expression at most a number of times, e.g. e{,n}

RepMinMax(Box<Expr>, u32u32)

Matches an expression a number of times within a range, e.g. e{m, n}

Skip(Vec<String>)

Continues to match expressions until one of the strings in the Vec is found

Push(Box<Expr>)

Matches an expression and pushes it to the stack, e.g. push(e)

Methods

impl Expr[src]

Important traits for ExprTopDownIterator
pub fn iter_top_down(&self) -> ExprTopDownIterator[src]

pub fn map_top_down<F>(self, f: F) -> Expr where
    F: FnMut(Expr) -> Expr
[src]

pub fn map_bottom_up<F>(self, f: F) -> Expr where
    F: FnMut(Expr) -> Expr
[src]

Trait Implementations

impl Clone for Expr[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Expr> for Expr[src]

impl Eq for Expr[src]

impl Debug for Expr[src]

Auto Trait Implementations

impl Send for Expr

impl Sync for Expr

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]