Represents a resolved switch label used for code generation.
More...
#include <bond/compiler/parsenodes.h>
Represents a resolved switch label used for code generation.
◆ ResolvedSwitchLabel()
| Bond::ResolvedSwitchLabel::ResolvedSwitchLabel |
( |
| ) |
|
|
inline |
Constructs a resolved switch label with default values.
◆ Accept() [1/2]
| virtual void Bond::ResolvedSwitchLabel::Accept |
( |
ParseNodeVisitor & | visitor | ) |
const |
|
inlineoverridevirtual |
Dispatches this node to the given visitor.
- Parameters
-
| visitor | Visitor that handles this node type. |
Implements Bond::ParseNode.
◆ Accept() [2/2]
Dispatches this node to the given visitor.
- Parameters
-
| visitor | Visitor that handles this node type. |
Implements Bond::ParseNode.
◆ GetContextToken()
| virtual const Token * Bond::ResolvedSwitchLabel::GetContextToken |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns the token used as source context for diagnostics.
- Returns
- A token associated with this node, or null if no token applies.
Implements Bond::ParseNode.
◆ GetJumpTargetId()
| size_t Bond::ResolvedSwitchLabel::GetJumpTargetId |
( |
| ) |
const |
|
inline |
Returns the jump target ID associated with this label.
◆ GetMatch()
| int32_t Bond::ResolvedSwitchLabel::GetMatch |
( |
| ) |
const |
|
inline |
Returns the resolved match value.
◆ IsDefault()
| bool Bond::ResolvedSwitchLabel::IsDefault |
( |
| ) |
const |
|
inline |
Returns true if this is the default label.
◆ operator==()
Compares two resolved labels by default flag and match value.
- Parameters
-
| other | Label to compare against. |
- Returns
- True if labels represent the same match semantics.
◆ SetIsDefault()
| void Bond::ResolvedSwitchLabel::SetIsDefault |
( |
bool | isDefault | ) |
|
|
inline |
Sets whether this is the default label.
- Parameters
-
| isDefault | True to mark this label as default. |
◆ SetJumpTargetId()
| void Bond::ResolvedSwitchLabel::SetJumpTargetId |
( |
size_t | targetId | ) |
|
|
inline |
Sets the jump target ID associated with this label.
- Parameters
-
| targetId | Jump target identifier. |
◆ SetMatch()
| void Bond::ResolvedSwitchLabel::SetMatch |
( |
int32_t | match | ) |
|
|
inline |
Sets the resolved match value.
- Parameters
-
The documentation for this class was generated from the following file:
- include/bond/compiler/parsenodes.h