pub enum YulStmt {
Block(YulBlock),
Decl(YulVarDecl),
Assign(YulVarAssign),
Call(YulFnCall),
If(YulIf),
For(YulFor),
Switch(YulSwitch),
Leave(leave),
Break(Break),
Continue(Continue),
FunctionDef(YulFunctionDef),
}
Expand description
A Yul statement.
Solidity Reference: https://docs.soliditylang.org/en/latest/grammar.html#a4.SolidityParser.yulStatement
Variants§
Block(YulBlock)
A Yul blocked scope: { ... }
.
Decl(YulVarDecl)
A variable declaration statement: let x := 0
.
Assign(YulVarAssign)
A variable assignment statement: x := 1
.
Call(YulFnCall)
A function call statement: foo(a, b)
.
If(YulIf)
A if statement: if lt(a, b) { ... }
.
For(YulFor)
A for statement: for {let i := 0} lt(i,10) {i := add(i,1)} { ... }
.
Switch(YulSwitch)
A switch statement: switch expr case 0 { ... } default { ... }
.
Leave(leave)
A leave statement: leave
.
Break(Break)
A break statement: break
.
Continue(Continue)
A continue statement: continue
.
FunctionDef(YulFunctionDef)
A function definition statement: function f() { ... }
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for YulStmt
impl RefUnwindSafe for YulStmt
impl !Send for YulStmt
impl !Sync for YulStmt
impl Unpin for YulStmt
impl UnwindSafe for YulStmt
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)