Struct evaltrees::ast::Decl[][src]

pub struct Decl<Aux> {
    pub name: Symbol,
    pub args: Vec<Pattern<Aux>>,
    pub body: Expr<Aux>,
    pub aux: Aux,
}

A function or value declaration.

Fields

The name of the function or value.

The arguments to the function. If empty, the decl is for a value.

The body of the function, or the expression assigned to the value.

Auxiliary data.

Methods

impl<Aux> Decl<Aux>
[src]

Converts the AST decl back to a CST decl.

impl<Aux> Decl<Aux>
[src]

Returns a Display that follows the given print style.

impl<Aux> Decl<Aux>
[src]

Gets the auxiliary data as a reference.

Returns the free variables of a declaration.

Modifies the aux value, recursively.

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

Clones the auxiliary data out.

Trait Implementations

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

Formats the value using the given formatter. Read more

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter. Read more

impl<Aux: PartialEq> PartialEq for Decl<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 Decl<Aux> where
    Aux: Send

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