wake.ir.yul.case_
module
#
YulCase
class
#
Bases: YulAbc
Represents a single case in a YulSwitch statement.
Example
Lines 4-6, 7-9, and 10-12 in the following example:
Source code in wake/ir/yul/case_.py
body: YulBlock
property
#
Returns:
Type | Description |
---|---|
YulBlock
|
Body of the case. |
children: Iterator[Union[YulBlock, YulLiteral]]
property
#
Yields:
Type | Description |
---|---|
Union[YulBlock, YulLiteral]
|
Direct children of this node. |
parent: YulSwitch
property
#
Returns:
Type | Description |
---|---|
YulSwitch
|
Parent IR node. |
value: Union[Literal['default'], YulLiteral]
property
#
May be either a YulLiteral or the string default
.
default
is used for the default case when neither of the cases match. The default case
is optional.
Returns:
Type | Description |
---|---|
Union[Literal['default'], YulLiteral]
|
Value that is compared to the switch expression. |