Enum solang_parser::pt::YulStatement
source · pub enum YulStatement {
Assign(Loc, Vec<YulExpression>, YulExpression),
VariableDeclaration(Loc, Vec<YulTypedIdentifier>, Option<YulExpression>),
If(Loc, YulExpression, YulBlock),
For(YulFor),
Switch(YulSwitch),
Leave(Loc),
Break(Loc),
Continue(Loc),
Block(YulBlock),
FunctionDefinition(Box<YulFunctionDefinition>),
FunctionCall(Box<YulFunctionCall>),
Error(Loc),
}
Expand description
A Yul statement.
Variants§
Assign(Loc, Vec<YulExpression>, YulExpression)
<1>,+ = <2>
VariableDeclaration(Loc, Vec<YulTypedIdentifier>, Option<YulExpression>)
let <1>,+ [:= <2>]
If(Loc, YulExpression, YulBlock)
if <1> <2>
For(YulFor)
A YulFor statement.
Switch(YulSwitch)
A YulSwitch statement.
Leave(Loc)
leave
Break(Loc)
break
Continue(Loc)
continue
Block(YulBlock)
A YulBlock statement.
FunctionDefinition(Box<YulFunctionDefinition>)
A YulFunctionDefinition statement.
FunctionCall(Box<YulFunctionCall>)
A YulFunctionCall statement.
Error(Loc)
An error occurred during parsing.
Trait Implementations§
source§impl Clone for YulStatement
impl Clone for YulStatement
source§fn clone(&self) -> YulStatement
fn clone(&self) -> YulStatement
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CodeLocation for YulStatement
impl CodeLocation for YulStatement
source§impl Debug for YulStatement
impl Debug for YulStatement
source§impl Display for YulStatement
impl Display for YulStatement
source§impl OptionalCodeLocation for YulStatement
impl OptionalCodeLocation for YulStatement
source§impl PartialEq for YulStatement
impl PartialEq for YulStatement
source§fn eq(&self, other: &YulStatement) -> bool
fn eq(&self, other: &YulStatement) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for YulStatement
impl StructuralPartialEq for YulStatement
Auto Trait Implementations§
impl Freeze for YulStatement
impl RefUnwindSafe for YulStatement
impl Send for YulStatement
impl Sync for YulStatement
impl Unpin for YulStatement
impl UnwindSafe for YulStatement
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more