A base class for tokenising code so that the syntax can be displayed in a code editor. More...
Inherited by CPlusPlusCodeTokeniser.
Public Member Functions | |
| CodeTokeniser () | |
| virtual | ~CodeTokeniser () |
| virtual int | readNextToken (CodeDocument::Iterator &source)=0 |
| Reads the next token from the source and returns its token type. | |
| virtual StringArray | getTokenTypes ()=0 |
| Returns a list of the names of the token types this analyser uses. | |
| virtual const Colour | getDefaultColour (int tokenType)=0 |
| Returns a suggested syntax highlighting colour for a specified token type. | |
A base class for tokenising code so that the syntax can be displayed in a code editor.
| CodeTokeniser::CodeTokeniser | ( | ) |
| virtual CodeTokeniser::~CodeTokeniser | ( | ) | [virtual] |
| virtual int CodeTokeniser::readNextToken | ( | CodeDocument::Iterator & | source ) | [pure virtual] |
Reads the next token from the source and returns its token type.
This must leave the source pointing to the first character in the next token.
Implemented in CPlusPlusCodeTokeniser.
| virtual StringArray CodeTokeniser::getTokenTypes | ( | ) | [pure virtual] |
Returns a list of the names of the token types this analyser uses.
The index in this list must match the token type numbers that are returned by readNextToken().
Implemented in CPlusPlusCodeTokeniser.
| virtual const Colour CodeTokeniser::getDefaultColour | ( | int | tokenType ) | [pure virtual] |
Returns a suggested syntax highlighting colour for a specified token type.
Implemented in CPlusPlusCodeTokeniser.