pub enum StatementType {
Show 18 variants
ExpressionStatement {
meta: Meta,
expression: Box<ExpressionType>,
},
BlockStatement(BlockStatementData),
FunctionBody(FunctionBodyData),
EmptyStatement {
meta: Meta,
},
DebuggerStatement {
meta: Meta,
},
ReturnStatement {
meta: Meta,
argument: Option<Box<ExpressionType>>,
},
BreakStatement {
meta: Meta,
},
ContinueStatement {
meta: Meta,
},
IfStatement {
meta: Meta,
test: Box<ExpressionType>,
consequent: Box<StatementType>,
alternate: Option<Box<StatementType>>,
},
SwitchStatement {
meta: Meta,
discriminant: Box<ExpressionType>,
cases: Vec<SwitchCaseData>,
},
ThrowStatement {
meta: Meta,
argument: Box<ExpressionType>,
},
TryStatement {
meta: Meta,
block: BlockStatementData,
handler: Option<CatchClauseData>,
finalizer: Option<BlockStatementData>,
},
WhileStatement {
meta: Meta,
test: Box<ExpressionType>,
body: Box<StatementType>,
},
DoWhileStatement {
meta: Meta,
test: Box<ExpressionType>,
body: Box<StatementType>,
},
ForStatement {
meta: Meta,
init: Option<VariableDeclarationOrExpression>,
test: Option<Box<ExpressionType>>,
update: Option<Box<ExpressionType>>,
body: Box<StatementType>,
},
ForInStatement(ForIteratorData),
ForOfStatement(ForIteratorData),
DeclarationStatement(DeclarationType),
}Variants§
ExpressionStatement
BlockStatement(BlockStatementData)
FunctionBody(FunctionBodyData)
EmptyStatement
DebuggerStatement
ReturnStatement
BreakStatement
ContinueStatement
IfStatement
Fields
§
test: Box<ExpressionType>§
consequent: Box<StatementType>§
alternate: Option<Box<StatementType>>SwitchStatement
ThrowStatement
TryStatement
Fields
§
block: BlockStatementData§
handler: Option<CatchClauseData>§
finalizer: Option<BlockStatementData>WhileStatement
DoWhileStatement
ForStatement
Fields
§
test: Option<Box<ExpressionType>>§
update: Option<Box<ExpressionType>>§
body: Box<StatementType>ForInStatement(ForIteratorData)
ForOfStatement(ForIteratorData)
DeclarationStatement(DeclarationType)
Trait Implementations§
Source§impl Debug for StatementType
impl Debug for StatementType
Auto Trait Implementations§
impl Freeze for StatementType
impl RefUnwindSafe for StatementType
impl !Send for StatementType
impl !Sync for StatementType
impl Unpin for StatementType
impl UnwindSafe for StatementType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more