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
Block
Fields
body: Vec<Statement> |
Transparent
Fields
body: Vec<Statement> |
Labeled
Fields
label: OwnedSlice | |
body: Box<Statement> |
VariableDeclaration
Fields
kind: VariableDeclarationKind | |
declarators: Vec<VariableDeclarator> |
Expression
Fields
value: Expression |
Return
Fields
value: Option<Expression> |
Break
Fields
label: Option<OwnedSlice> |
Function
Fields
name: OwnedSlice | |
params: Vec<Parameter> | |
body: Vec<Statement> |
If
Fields
test: Expression | |
consequent: Box<Statement> | |
alternate: Option<Box<Statement>> |
While
Fields
test: Expression | |
body: Box<Statement> |
For
Fields
init: Option<Box<Statement>> | |
test: Option<Expression> | |
update: Option<Expression> | |
body: Box<Statement> |
ForIn
Fields
left: Box<Statement> | |
right: Expression | |
body: Box<Statement> |
ForOf
Fields
left: Box<Statement> | |
right: Expression | |
body: Box<Statement> |
Class
Fields
name: OwnedSlice | |
extends: Option<OwnedSlice> | |
body: Vec<ClassMember> |
Throw
Fields
value: Expression |
Trait Implementations
impl Debug for Statement
[src]
impl PartialEq for Statement
[src]
fn eq(&self, __arg_0: &Statement) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Statement) -> bool
This method tests for !=
.
impl Clone for Statement
[src]
fn clone(&self) -> Statement
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl From<Expression> for Statement
[src]
fn from(expression: Expression) -> Self
Performs the conversion.