Enum evaltrees::ast::Expr[][src]

pub enum Expr<Aux> {
    If(Box<Expr<Aux>>, Box<Expr<Aux>>, Box<Expr<Aux>>, Aux),
    Literal(Literal, Aux),
    Op(OpBox<Expr<Aux>>, Box<Expr<Aux>>, Aux),
    Variable(Symbol, Aux),
}

An expression.

Variants

A conditional expression.

A literal value.

A binary operator.

A variable.

Methods

impl<Aux> Expr<Aux>
[src]

Converts the AST expression back to a CST expression.

impl<Aux> Expr<Aux>
[src]

Returns a Display that follows the given print style.

impl<Aux> Expr<Aux>
[src]

Gets the auxiliary data as a reference.

Returns the number of occurrences of variables.

Returns the free variables of an expression.

Modifies the aux value, recursively.

impl<Aux: Clone> Expr<Aux>
[src]

Clones the auxiliary data out.

Trait Implementations

impl<Aux: Clone> Clone for Expr<Aux>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<Aux: Debug> Debug for Expr<Aux>
[src]

Formats the value using the given formatter. Read more

impl<Aux> Display for Expr<Aux>
[src]

Formats the value using the given formatter. Read more

impl<Aux: PartialEq> PartialEq for Expr<Aux>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl<Aux> Send for Expr<Aux> where
    Aux: Send

impl<Aux> Sync for Expr<Aux> where
    Aux: Sync