Represents a switch statement.
More...
#include <bond/compiler/parsenodes.h>
Represents a switch statement.
◆ SwitchStatement()
Constructs a switch statement.
- Parameters
-
| keyword | Switch keyword token. |
| control | Switch control expression. |
| sectionList | List of switch sections. |
◆ ~SwitchStatement()
| virtual Bond::SwitchStatement::~SwitchStatement |
( |
| ) |
|
|
inlinevirtual |
◆ Accept() [1/2]
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::SwitchStatement::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.
◆ GetControl() [1/2]
| Expression * Bond::SwitchStatement::GetControl |
( |
| ) |
|
|
inline |
Returns the switch control expression.
◆ GetControl() [2/2]
| const Expression * Bond::SwitchStatement::GetControl |
( |
| ) |
const |
|
inline |
Returns the switch control expression.
◆ GetKeyword()
| const Token * Bond::SwitchStatement::GetKeyword |
( |
| ) |
const |
|
inline |
Returns the switch keyword token.
◆ GetMaxMatch()
| int32_t Bond::SwitchStatement::GetMaxMatch |
( |
| ) |
const |
|
inline |
Returns largest case match value.
◆ GetMinMatch()
| int32_t Bond::SwitchStatement::GetMinMatch |
( |
| ) |
const |
|
inline |
Returns smallest case match value.
◆ GetNumMatches()
| uint32_t Bond::SwitchStatement::GetNumMatches |
( |
| ) |
const |
|
inline |
Returns number of non-default case matches.
◆ GetResolvedLabelList()
Returns the resolved linearized label list.
◆ GetSectionList() [1/2]
Returns the list of switch sections.
◆ GetSectionList() [2/2]
| const SwitchSection * Bond::SwitchStatement::GetSectionList |
( |
| ) |
const |
|
inline |
Returns the list of switch sections.
◆ SetMaxMatch()
| void Bond::SwitchStatement::SetMaxMatch |
( |
int32_t | maxMatch | ) |
|
|
inline |
Sets largest case match value.
- Parameters
-
| maxMatch | Largest match value. |
◆ SetMinMatch()
| void Bond::SwitchStatement::SetMinMatch |
( |
int32_t | minMatch | ) |
|
|
inline |
Sets smallest case match value.
- Parameters
-
| minMatch | Smallest match value. |
◆ SetNumMatches()
| void Bond::SwitchStatement::SetNumMatches |
( |
uint32_t | numMatches | ) |
|
|
inline |
Sets number of non-default case matches.
- Parameters
-
| numMatches | Number of case matches. |
◆ SetResolvedLabelList()
Sets the resolved linearized label list.
- Parameters
-
| labelList | Head of resolved switch labels. |
The documentation for this class was generated from the following file:
- include/bond/compiler/parsenodes.h