Enum ratel::grammar::Statement [] [src]

pub enum Statement {
    Empty,
    Block {
        body: Vec<Statement>,
    },
    Transparent {
        body: Vec<Statement>,
    },
    Labeled {
        label: OwnedSlice,
        body: Box<Statement>,
    },
    VariableDeclaration {
        kind: VariableDeclarationKind,
        declarators: Vec<VariableDeclarator>,
    },
    Expression {
        value: Expression,
    },
    Return {
        value: Option<Expression>,
    },
    Break {
        label: Option<OwnedSlice>,
    },
    Function {
        name: OwnedSlice,
        params: Vec<Parameter>,
        body: Vec<Statement>,
    },
    Class {
        name: OwnedSlice,
        extends: Option<OwnedSlice>,
        body: Vec<ClassMember>,
    },
    If {
        test: Expression,
        consequent: Box<Statement>,
        alternate: Option<Box<Statement>>,
    },
    While {
        test: Expression,
        body: Box<Statement>,
    },
    For {
        init: Option<Box<Statement>>,
        test: Option<Expression>,
        update: Option<Expression>,
        body: Box<Statement>,
    },
    ForIn {
        left: Box<Statement>,
        right: Expression,
        body: Box<Statement>,
    },
    ForOf {
        left: Box<Statement>,
        right: Expression,
        body: Box<Statement>,
    },
    Throw {
        value: Expression,
    },
    Try {
        body: Box<Statement>,
        error: OwnedSlice,
        handler: Box<Statement>,
    },
}

Variants

Fields of Block

Fields of Transparent

Fields of Labeled

Fields of VariableDeclaration

Fields of Expression

Fields of Return

Fields of Break

Fields of Function

Fields of Class

Fields of If

Fields of While

Fields of For

Fields of ForIn

Fields of ForOf

Fields of Throw

Fields of Try

Trait Implementations

impl Debug for Statement
[src]

Formats the value using the given formatter.

impl PartialEq for Statement
[src]

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

This method tests for !=.

impl Clone for Statement
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl From<Expression> for Statement
[src]

Performs the conversion.