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: YulBlock
property
#
Returns:
Type | Description |
---|---|
YulBlock
|
Body of the function executed if the condition is true. |
children: Iterator[Union[YulBlock, YulFunctionCall, YulIdentifier, YulLiteral]]
property
#
Yields:
Type | Description |
---|---|
Union[YulBlock, YulFunctionCall, YulIdentifier, YulLiteral]
|
Direct children of this node. |
condition: Union[YulFunctionCall, YulIdentifier, YulLiteral]
property
#
Returns:
Type | Description |
---|---|
Union[YulFunctionCall, YulIdentifier, YulLiteral]
|
Condition of the if statement. |
parent: YulBlock
property
#
Returns:
Type | Description |
---|---|
YulBlock
|
Parent IR node. |