Bond 0.9
C++ Bond Runtime Library API Documentation
|
An ordered immutable collection of Tokens. More...
#include <bond/compiler/tokenstream.h>
Public Member Functions | |
TokenCollection (const Token *tokens, int numTokens) | |
Constructs a TokenCollection object. More... | |
TokenStream | GetTokenStream () const |
Returns a TokenStream object to iterate over the contents of the collection. More... | |
An ordered immutable collection of Tokens.
A TokenCollection is the output from a Lexer and can be used as the input to a Parser. Several TokenCollections can be daisy-chained in a linked list.
|
inline |
Constructs a TokenCollection object.
tokens | A pointer to an array of Token objects that form the contents of the collection. |
numTokens | The number of Tokens contained in the collection. |
|
inline |
Returns a TokenStream object to iterate over the contents of the collection.