pub enum Stmt {
Show 14 variants
Block(BlockStmt),
Declaration(Declaration),
Expression(ExpressionStmt),
If(IfStmt),
Switch(SwitchStmt),
Return(ReturnStmt),
While(WhileStmt),
DoWhile(DoWhileStmt),
For(ForStmt),
Case(CaseStmt),
Default(DefaultStmt),
Break(SimpleStmt),
Continue(SimpleStmt),
Empty(SimpleStmt),
}Expand description
One statement in NWScript source.
Variants§
Block(BlockStmt)
{ ... }
Declaration(Declaration)
One declaration statement.
Expression(ExpressionStmt)
One expression statement.
If(IfStmt)
if (...) ... [else ...]
Switch(SwitchStmt)
switch (...) ...
Return(ReturnStmt)
return [expr];
While(WhileStmt)
while (...) ...
DoWhile(DoWhileStmt)
do ... while (...);
For(ForStmt)
for (...; ...; ...) ...
Case(CaseStmt)
case expr:
Default(DefaultStmt)
default:
Break(SimpleStmt)
break;
Continue(SimpleStmt)
continue;
Empty(SimpleStmt)
;
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Stmt
impl<'de> Deserialize<'de> for Stmt
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Stmt
Auto Trait Implementations§
impl Freeze for Stmt
impl RefUnwindSafe for Stmt
impl Send for Stmt
impl Sync for Stmt
impl Unpin for Stmt
impl UnsafeUnpin for Stmt
impl UnwindSafe for Stmt
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