A CPP_Token_Stream, does not include preprocessor directives. Doing so would greatly complicate any grammer. Instead, preprocessor directives are handled only if desired in an out of band style. To handle preprocessor directives, derive a class from this one (CPP_Token_Stream_Prep) and implement a virtual method which will be invoked by the stream as preprocessor directives are encountered. Note that the '#' and any spaces surrounding it will not be included in the text passed to the virtual method. More...
#include <cpp_token_stream.h>
Public Member Functions | |
CPP_Token_Stream_Prep () | |
default constructor | |
virtual void | operator() (std::string const &text, std::string const &file, int line) const =0 |
User defined callback handler to deal with preprocessor tokens. | |
virtual | ~CPP_Token_Stream_Prep () |
A CPP_Token_Stream, does not include preprocessor directives. Doing so would greatly complicate any grammer. Instead, preprocessor directives are handled only if desired in an out of band style. To handle preprocessor directives, derive a class from this one (CPP_Token_Stream_Prep) and implement a virtual method which will be invoked by the stream as preprocessor directives are encountered. Note that the '#' and any spaces surrounding it will not be included in the text passed to the virtual method.
Definition at line 172 of file cpp_token_stream.h.
default constructor
Definition at line 189 of file cpp_token_stream.h.
virtual ~CPP_Token_Stream_Prep | ( | ) | [virtual] |
Definition at line 194 of file cpp_token_stream.h.
virtual void operator() | ( | std::string const & | text, | |
std::string const & | file, | |||
int | line | |||
) | const [pure virtual] |
User defined callback handler to deal with preprocessor tokens.
text | the text of the preprocessor directive | |
file | the name of the file | |
line | the line number of the preprocessor directive |
Implemented in DefineHandler, and DefineHandler.