|
Bond 0.9
C++ Bond Runtime Library API Documentation
|
Represents an if/else statement. More...
#include <bond/compiler/parsenodes.h>
Public Member Functions | |
| IfStatement (const Token *keyword, Expression *condition, ParseNode *thenStatement, ParseNode *elseStatement) | |
| Constructs an if statement. | |
| virtual | ~IfStatement () |
| 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 * | GetKeyword () const |
| Returns the if keyword token. | |
| Expression * | GetCondition () |
| Returns the condition expression. | |
| const Expression * | GetCondition () const |
| Returns the condition expression. | |
| ParseNode * | GetThenStatement () |
| Returns the then-branch statement. | |
| const ParseNode * | GetThenStatement () const |
| Returns the then-branch statement. | |
| ParseNode * | GetElseStatement () |
| Returns the else-branch statement. | |
| const ParseNode * | GetElseStatement () const |
| Returns the else-branch statement. | |
| Public Member Functions inherited from Bond::ListParseNode | |
| virtual | ~ListParseNode () |
| 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 () |
Additional Inherited Members | |
| Protected Member Functions inherited from Bond::ListParseNode | |
| ListParseNode () | |
| Protected Member Functions inherited from Bond::ParseNode | |
| ParseNode () | |
Represents an if/else statement.
|
inline |
Constructs an if statement.
| keyword | If keyword token. |
| condition | Condition expression. |
| thenStatement | Statement executed when condition is true. |
| elseStatement | Optional statement executed when condition is false. |
|
inlinevirtual |
|
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.
|
inline |
Returns the condition expression.
|
inline |
Returns the condition expression.
|
inlineoverridevirtual |
Returns the token used as source context for diagnostics.
Implements Bond::ParseNode.
|
inline |
Returns the else-branch statement.
|
inline |
Returns the else-branch statement.
|
inline |
Returns the if keyword token.
|
inline |
Returns the then-branch statement.
|
inline |
Returns the then-branch statement.