Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Bond::TokenCollection Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TokenCollection()

Bond::TokenCollection::TokenCollection ( const Token tokens,
int  numTokens 
)
inline

Constructs a TokenCollection object.

Parameters
tokensA pointer to an array of Token objects that form the contents of the collection.
numTokensThe number of Tokens contained in the collection.

Member Function Documentation

◆ GetTokenStream()

TokenStream Bond::TokenCollection::GetTokenStream ( ) const
inline

Returns a TokenStream object to iterate over the contents of the collection.


The documentation for this class was generated from the following file: