|
Bond 0.9
C++ Bond Runtime Library API Documentation
|
Represents a for loop and its local scope. More...
#include <bond/compiler/parsenodes.h>
Public Member Functions | |
| ForStatement (const Token *keyword, ParseNode *initializer, Expression *condition, Expression *countingExpression, ParseNode *body) | |
| Constructs a for statement. | |
| virtual | ~ForStatement () |
| 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 SymbolType | GetSymbolType () const override |
| Returns the concrete symbol type. | |
| virtual const Token * | GetContextToken () const override |
| Returns the token used as source context for diagnostics. | |
| const Token * | GetKeyword () const |
| Returns the for keyword token. | |
| ParseNode * | GetInitializer () |
| Returns the loop initializer. | |
| const ParseNode * | GetInitializer () const |
| Returns the loop initializer. | |
| Expression * | GetCondition () |
| Returns the loop condition expression. | |
| const Expression * | GetCondition () const |
| Returns the loop condition expression. | |
| Expression * | GetCountingExpression () |
| Returns the loop counting expression. | |
| const Expression * | GetCountingExpression () const |
| Returns the loop counting expression. | |
| ParseNode * | GetBody () |
| Returns the loop body. | |
| const ParseNode * | GetBody () const |
| Returns the loop body. | |
| Public Member Functions inherited from Bond::Symbol | |
| virtual | ~Symbol () |
| virtual const Token * | GetName () const |
| Returns the symbol name token. | |
| virtual TypeAndValue * | GetTypeAndValue () |
| Returns the symbol's type-and-value metadata. | |
| virtual const TypeAndValue * | GetTypeAndValue () const |
| Returns the symbol's type-and-value metadata. | |
| virtual bool | IsResolved () const |
| Returns true when symbol resolution has completed for this symbol. | |
| bool | IsTypeDefinition () const |
| Returns true if this symbol defines a type. | |
| Symbol * | GetParentSymbol () |
| Returns the enclosing symbol. | |
| const Symbol * | GetParentSymbol () const |
| Returns the enclosing symbol. | |
| void | SetParentSymbol (Symbol *parent) |
| Sets the enclosing symbol. | |
| Symbol * | FindSymbol (const StringView &name) |
| Finds a directly contained symbol by name. | |
| const Symbol * | FindSymbol (const StringView &name) const |
| Finds a directly contained symbol by name. | |
| Symbol * | FindSymbol (const Token *name) |
| Finds a directly contained symbol by token text. | |
| const Symbol * | FindSymbol (const Token *name) const |
| Finds a directly contained symbol by token text. | |
| Symbol * | FindSymbol (const QualifiedIdentifier *identifier) |
| Finds a symbol referenced by a qualified identifier. | |
| const Symbol * | FindSymbol (const QualifiedIdentifier *identifier) const |
| Finds a symbol referenced by a qualified identifier. | |
| void | InsertSymbol (Symbol *symbol) |
| Inserts a symbol into this symbol's child list. | |
| bool | IsAnonymous () const |
| Returns true if this symbol has no explicit name. | |
| bool | Matches (const StringView &name) const |
| Returns true if this symbol's name matches the given text. | |
| 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 | |
| Public Types inherited from Bond::Symbol | |
| enum | SymbolType { TYPE_NAMESPACE , TYPE_STRUCT , TYPE_ENUM , TYPE_LOCALSCOPE , TYPE_VALUE , TYPE_FUNCTION } |
| Identifies the concrete symbol category. More... | |
| Protected Member Functions inherited from Bond::Symbol | |
| Symbol () | |
| Protected Member Functions inherited from Bond::ListParseNode | |
| ListParseNode () | |
| Protected Member Functions inherited from Bond::ParseNode | |
| ParseNode () | |
Represents a for loop and its local scope.
|
inline |
Constructs a for statement.
| keyword | For keyword token. |
| initializer | Optional initializer statement. |
| condition | Optional condition expression. |
| countingExpression | Optional counting expression. |
| body | Loop body. |
|
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 loop body.
|
inline |
Returns the loop body.
|
inline |
Returns the loop condition expression.
|
inline |
Returns the loop condition expression.
|
inlineoverridevirtual |
Returns the token used as source context for diagnostics.
Reimplemented from Bond::Symbol.
|
inline |
Returns the loop counting expression.
|
inline |
Returns the loop counting expression.
|
inline |
Returns the loop initializer.
|
inline |
Returns the loop initializer.
|
inline |
Returns the for keyword token.
|
inlineoverridevirtual |
Returns the concrete symbol type.
Implements Bond::Symbol.