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

pub enum Statement {
    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>,
    },
    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>,
    },
    Class {
        name: OwnedSlice,
        extends: Option<OwnedSlice>,
        body: Vec<ClassMember>,
    },
    Throw {
        value: Expression,
    },
}

Variants

Fields

Fields

Fields

Fields

Fields

Fields

Fields

Fields

Fields

Fields

Fields

Fields

Fields

Fields

Fields

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.