Represents a while or do-while loop.
More...
#include <bond/compiler/parsenodes.h>
Represents a while or do-while loop.
◆ WhileStatement()
Constructs a while/do-while statement.
- Parameters
-
| keyword | Loop keyword token. |
| condition | Loop condition expression. |
| body | Loop body. |
◆ ~WhileStatement()
| virtual Bond::WhileStatement::~WhileStatement |
( |
| ) |
|
|
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.
◆ GetBody() [1/2]
| ParseNode * Bond::WhileStatement::GetBody |
( |
| ) |
|
|
inline |
◆ GetBody() [2/2]
| const ParseNode * Bond::WhileStatement::GetBody |
( |
| ) |
const |
|
inline |
◆ GetCondition() [1/2]
| Expression * Bond::WhileStatement::GetCondition |
( |
| ) |
|
|
inline |
Returns the loop condition expression.
◆ GetCondition() [2/2]
| const Expression * Bond::WhileStatement::GetCondition |
( |
| ) |
const |
|
inline |
Returns the loop condition expression.
◆ GetContextToken()
| virtual const Token * Bond::WhileStatement::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::WhileStatement::GetKeyword |
( |
| ) |
const |
|
inline |
Returns the loop keyword token.
◆ IsDoLoop()
| bool Bond::WhileStatement::IsDoLoop |
( |
| ) |
const |
|
inline |
Returns true when this node represents a do-while loop.
The documentation for this class was generated from the following file:
- include/bond/compiler/parsenodes.h