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
Empty
Block
Fields of Block
body: Vec<Statement> |
Transparent
Fields of Transparent
body: Vec<Statement> |
Labeled
Fields of Labeled
label: OwnedSlice | |
body: Box<Statement> |
VariableDeclaration
Fields of VariableDeclaration
kind: VariableDeclarationKind | |
declarators: Vec<VariableDeclarator> |
Expression
Fields of Expression
value: Expression |
Return
Fields of Return
value: Option<Expression> |
Break
Fields of Break
label: Option<OwnedSlice> |
Function
Fields of Function
name: OwnedSlice | |
params: Vec<Parameter> | |
body: Vec<Statement> |
Class
Fields of Class
name: OwnedSlice | |
extends: Option<OwnedSlice> | |
body: Vec<ClassMember> |
If
Fields of If
test: Expression | |
consequent: Box<Statement> | |
alternate: Option<Box<Statement>> |
While
Fields of While
test: Expression | |
body: Box<Statement> |
For
Fields of For
init: Option<Box<Statement>> | |
test: Option<Expression> | |
update: Option<Expression> | |
body: Box<Statement> |
ForIn
Fields of ForIn
left: Box<Statement> | |
right: Expression | |
body: Box<Statement> |
ForOf
Fields of ForOf
left: Box<Statement> | |
right: Expression | |
body: Box<Statement> |
Throw
Fields of Throw
value: Expression |
Try
Fields of Try
body: Box<Statement> | |
error: OwnedSlice | |
handler: Box<Statement> |
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.