A simple lexical analyser for syntax colouring of C++ code. More...
#include <juce_CPlusPlusCodeTokeniser.h>
Public Types | |
enum | TokenType { tokenType_error = 0, tokenType_comment, tokenType_keyword, tokenType_operator, tokenType_identifier, tokenType_integer, tokenType_float, tokenType_string, tokenType_bracket, tokenType_punctuation, tokenType_preprocessor } |
The token values returned by this tokeniser. More... | |
Public Member Functions | |
CPlusPlusCodeTokeniser () | |
~CPlusPlusCodeTokeniser () | |
CodeEditorComponent::ColourScheme | getDefaultColourScheme () override |
Returns a suggested syntax highlighting colour scheme. More... | |
int | readNextToken (CodeDocument::Iterator &) override |
Reads the next token from the source and returns its token type. More... | |
Static Public Member Functions | |
static bool | isReservedKeyword (const String &token) noexcept |
This is a handy method for checking whether a string is a c++ reserved keyword. More... | |
A simple lexical analyser for syntax colouring of C++ code.
CPlusPlusCodeTokeniser::CPlusPlusCodeTokeniser | ( | ) |
CPlusPlusCodeTokeniser::~CPlusPlusCodeTokeniser | ( | ) |
|
overridevirtual |
Returns a suggested syntax highlighting colour scheme.
Implements CodeTokeniser.
|
staticnoexcept |
This is a handy method for checking whether a string is a c++ reserved keyword.
|
overridevirtual |
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.
Implements CodeTokeniser.