|
Bond 0.9
C++ Bond Runtime Library API Documentation
|
Represents a case or default label in a switch section. More...
#include <bond/compiler/parsenodes.h>
Public Member Functions | |
| SwitchLabel (const Token *label) | |
| Constructs a default-style switch label with no expression. | |
| SwitchLabel (const Token *label, Expression *expression) | |
| Constructs a case label with an expression. | |
| virtual | ~SwitchLabel () |
| Destroys a SwitchLabel object. | |
| virtual void | Accept (ParseNodeVisitor &visitor) override |
| Dispatches this node to the given visitor. | |
| virtual void | Accept (ParseNodeVisitor &visitor) const override |
| Dispatches this node to the given visitor. | |
| virtual const Token * | GetContextToken () const override |
| Returns the token used as source context for diagnostics. | |
| const Token * | GetLabel () const |
| Returns the label token. | |
| Expression * | GetExpression () |
| Returns the case expression. | |
| const Expression * | GetExpression () const |
| Returns the case expression. | |
| ResolvedSwitchLabel & | GetResolvedLabel () |
| Returns resolved label metadata. | |
| const ResolvedSwitchLabel & | GetResolvedLabel () const |
| Returns resolved label metadata. | |
| bool | IsDefaultLabel () const |
| Returns true if this label is a default label. | |
| Public Member Functions inherited from Bond::ListParseNode | |
| virtual | ~ListParseNode () |
| Destroys a ListParseNode object. | |
| ListParseNode * | GetNextNode () |
| Returns the next node in the list. | |
| const ListParseNode * | GetNextNode () const |
| Returns the next node in the list. | |
| void | SetNextNode (ListParseNode *next) |
| Sets the next node in the list. | |
| Public Member Functions inherited from Bond::ParseNode | |
| virtual | ~ParseNode () |
| Destroys a ParseNode object. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Bond::ListParseNode | |
| ListParseNode () | |
| Protected Member Functions inherited from Bond::ParseNode | |
| ParseNode () | |
Represents a case or default label in a switch section.
|
inlineexplicit |
Constructs a default-style switch label with no expression.
| label | Label token. |
|
inline |
Constructs a case label with an expression.
| label | Label token. |
| expression | Case match expression. |
|
inlinevirtual |
Destroys a SwitchLabel object.
|
inlineoverridevirtual |
Dispatches this node to the given visitor.
| visitor | Visitor that handles this node type. |
Implements Bond::ParseNode.
|
inlineoverridevirtual |
Dispatches this node to the given visitor.
| visitor | Visitor that handles this node type. |
Implements Bond::ParseNode.
|
inlineoverridevirtual |
Returns the token used as source context for diagnostics.
Implements Bond::ParseNode.
|
inline |
Returns the case expression.
|
inline |
Returns the case expression.
|
inline |
Returns the label token.
|
inline |
Returns resolved label metadata.
|
inline |
Returns resolved label metadata.
|
inline |
Returns true if this label is a default label.