wake.ir.yul.if_statement
module
#
YulIf
class
#
Bases: YulStatementAbc
Represents an if statement with the following structure:
Note
There is no else branch in Yul. It must be implemented using a second if statement when needed.
Source code in wake/ir/yul/if_statement.py
body
property
#
Returns:
| Type | Description |
|---|---|
YulBlock
|
Body of the function executed if the condition is true. |
children
property
#
Yields:
| Type | Description |
|---|---|
Union[YulBlock, YulFunctionCall, YulIdentifier, YulLiteral]
|
Direct children of this node. |
condition
property
#
Returns:
| Type | Description |
|---|---|
Union[YulFunctionCall, YulIdentifier, YulLiteral]
|
Condition of the if statement. |