Represents a break, continue, or return statement.
More...
#include <bond/compiler/parsenodes.h>
Represents a break, continue, or return statement.
◆ JumpStatement()
| Bond::JumpStatement::JumpStatement |
( |
const Token * | keyword, |
|
|
Expression * | rhs ) |
|
inline |
Constructs a jump statement.
- Parameters
-
| keyword | Jump keyword token. |
| rhs | Optional return expression. |
◆ ~JumpStatement()
| virtual Bond::JumpStatement::~JumpStatement |
( |
| ) |
|
|
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::JumpStatement::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.
◆ GetKeyword()
| const Token * Bond::JumpStatement::GetKeyword |
( |
| ) |
const |
|
inline |
Returns the jump keyword token.
◆ GetRhs() [1/2]
Returns the right-hand-side expression.
◆ GetRhs() [2/2]
| const Expression * Bond::JumpStatement::GetRhs |
( |
| ) |
const |
|
inline |
Returns the right-hand-side expression.
◆ IsBreak()
| bool Bond::JumpStatement::IsBreak |
( |
| ) |
const |
|
inline |
Returns true if this is a break statement.
◆ IsContinue()
| bool Bond::JumpStatement::IsContinue |
( |
| ) |
const |
|
inline |
Returns true if this is a continue statement.
◆ IsReturn()
| bool Bond::JumpStatement::IsReturn |
( |
| ) |
const |
|
inline |
Returns true if this is a return statement.
The documentation for this class was generated from the following file:
- include/bond/compiler/parsenodes.h