Enum solang_parser::pt::Statement
source · [−]pub enum Statement {
Show 16 variants
Block {
loc: Loc,
unchecked: bool,
statements: Vec<Statement>,
},
Assembly {
loc: Loc,
dialect: Option<StringLiteral>,
flags: Option<Vec<StringLiteral>>,
block: YulBlock,
},
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>),
Revert(Loc, Option<IdentifierPath>, Vec<Expression>),
RevertNamedArgs(Loc, Option<IdentifierPath>, Vec<NamedArgument>),
Emit(Loc, Expression),
Try(Loc, Expression, Option<(ParameterList, Box<Statement>)>, Vec<CatchClause>),
}
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>)
Revert(Loc, Option<IdentifierPath>, Vec<Expression>)
RevertNamedArgs(Loc, Option<IdentifierPath>, Vec<NamedArgument>)
Emit(Loc, Expression)
Try(Loc, Expression, Option<(ParameterList, Box<Statement>)>, Vec<CatchClause>)
Trait Implementations
impl Eq for Statement
impl StructuralEq for Statement
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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