Enum espr::ast::Statement[][src]

pub enum Statement {
    Alias {
        name: String,
        dest: String,
        qualifiers: Vec<Qualifier>,
        statements: Vec<Statement>,
    },
    Assignment {
        name: String,
        qualifiers: Vec<Qualifier>,
        expr: Expression,
    },
    Compound {
        statements: Vec<Statement>,
    },
    If {
        condition: Expression,
        then_branch: Vec<Statement>,
        else_branch: Option<Vec<Statement>>,
    },
    Case {
        selector: Expression,
        actions: Vec<(Vec<Expression>, Statement)>,
        otherwise: Option<Box<Statement>>,
    },
    Repeat {
        control: RepeatControl,
        statements: Vec<Statement>,
    },
    Return {
        value: Option<Expression>,
    },
    ProcedureCall {
        procedure: ProcedureCallName,
        parameters: Option<Vec<Expression>>,
    },
    Skip,
    Escape,
    Null,
}

Variants

Alias

Fields of Alias

name: Stringdest: Stringqualifiers: Vec<Qualifier>statements: Vec<Statement>
Assignment

Fields of Assignment

name: Stringqualifiers: Vec<Qualifier>expr: Expression
Compound

Fields of Compound

statements: Vec<Statement>
If

Fields of If

condition: Expressionthen_branch: Vec<Statement>else_branch: Option<Vec<Statement>>
Case

Fields of Case

selector: Expressionactions: Vec<(Vec<Expression>, Statement)>otherwise: Option<Box<Statement>>
Repeat

Fields of Repeat

control: RepeatControlstatements: Vec<Statement>
Return

Fields of Return

value: Option<Expression>
ProcedureCall

Fields of ProcedureCall

procedure: ProcedureCallNameparameters: Option<Vec<Expression>>
Skip
Escape
Null

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.