wake.ir.yul.switch
module
#
YulSwitch
class
#
Bases: YulStatementAbc
Represents a switch statement with the following structure:
Source code in wake/ir/yul/switch.py
cases: Tuple[YulCase, ...]
property
#
The default
case is optional.
Returns:
Type | Description |
---|---|
Tuple[YulCase, ...]
|
Tuple of cases of this switch statement in the order they appear in the source code. |
children: Iterator[Union[YulFunctionCall, YulIdentifier, YulLiteral, YulCase]]
property
#
Yields:
Type | Description |
---|---|
Union[YulFunctionCall, YulIdentifier, YulLiteral, YulCase]
|
Direct children of this node. |
expression: Union[YulFunctionCall, YulIdentifier, YulLiteral]
property
#
Returns:
Type | Description |
---|---|
Union[YulFunctionCall, YulIdentifier, YulLiteral]
|
Expression that is evaluated to determine which case to execute. |
parent: YulBlock
property
#
Returns:
Type | Description |
---|---|
YulBlock
|
Parent IR node. |