Enum solang_parser::pt::Statement
source · [−]pub enum Statement {
Show 15 variants
Block {
loc: Loc,
unchecked: bool,
statements: Vec<Statement>,
},
Assembly {
loc: Loc,
dialect: Option<StringLiteral>,
statements: Vec<AssemblyStatement>,
},
Args(Loc, Vec<NamedArgument>),
If(Loc, Expression, Box<Statement>, Option<Box<Statement>>),
While(Loc, Expression, Box<Statement>),
Expression(Loc, Expression),
VariableDefinition(Loc, VariableDeclaration, Option<Expression>),
For(Loc, Option<Box<Statement>>, Option<Box<Expression>>, Option<Box<Statement>>, Option<Box<Statement>>),
DoWhile(Loc, Box<Statement>, Expression),
Continue(Loc),
Break(Loc),
Return(Loc, Option<Expression>),
Emit(Loc, Expression),
Try(Loc, Expression, Option<(Vec<(Loc, Option<Parameter>)>, Box<Statement>)>, Vec<CatchClause>),
DocComment(Loc, CommentType, String),
}
Variants
Block
Assembly
Args(Loc, Vec<NamedArgument>)
If(Loc, Expression, Box<Statement>, Option<Box<Statement>>)
While(Loc, Expression, Box<Statement>)
Expression(Loc, Expression)
VariableDefinition(Loc, VariableDeclaration, Option<Expression>)
For(Loc, Option<Box<Statement>>, Option<Box<Expression>>, Option<Box<Statement>>, Option<Box<Statement>>)
DoWhile(Loc, Box<Statement>, Expression)
Continue(Loc)
Break(Loc)
Return(Loc, Option<Expression>)
Emit(Loc, Expression)
Try(Loc, Expression, Option<(Vec<(Loc, Option<Parameter>)>, Box<Statement>)>, Vec<CatchClause>)
DocComment(Loc, CommentType, String)
Implementations
Trait Implementations
impl StructuralPartialEq for Statement
Auto Trait Implementations
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnwindSafe for Statement
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more