Loading...
Searching...
No Matches
juce::CPlusPlusCodeTokeniser Class Reference

## Detailed Description

A simple lexical analyser for syntax colouring of C++ code.

See also
  CodeEditorComponent, CodeDocument

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

- juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniser.h

Inheritance diagram for juce::CPlusPlusCodeTokeniser:

## 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 () override
int | readNextToken (CodeDocument::Iterator &) override
| Reads the next token from the source and returns its token type.
CodeEditorComponent::ColourScheme | getDefaultColourScheme () override
| Returns a suggested syntax highlighting colour scheme.
Public Member Functions inherited from juce::CodeTokeniser
| CodeTokeniser ()=default
virtual | ~CodeTokeniser ()=default

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

## Member Enums

## TokenType

enum juce::CPlusPlusCodeTokeniser::TokenType

The token values returned by this tokeniser.

Enumerator
tokenType_error |
tokenType_comment |
tokenType_keyword |
tokenType_operator |
tokenType_identifier |
tokenType_integer |
tokenType_float |
tokenType_string |
tokenType_bracket |
tokenType_punctuation |
tokenType_preprocessor |

## Constructors and Destructors

## CPlusPlusCodeTokeniser()

juce::CPlusPlusCodeTokeniser::CPlusPlusCodeTokeniser | ( |  | ) |

## ~CPlusPlusCodeTokeniser()

juce::CPlusPlusCodeTokeniser::~CPlusPlusCodeTokeniser | ( |  | ) |

override

## Member Functions

## readNextToken()

int juce::CPlusPlusCodeTokeniser::readNextToken | ( | CodeDocument::Iterator & | source | ) |

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

Implements juce::CodeTokeniser.

## getDefaultColourScheme()

CodeEditorComponent::ColourScheme juce::CPlusPlusCodeTokeniser::getDefaultColourScheme | ( |  | ) |

override virtual

Returns a suggested syntax highlighting colour scheme.

Implements juce::CodeTokeniser.

## isReservedKeyword()

bool juce::CPlusPlusCodeTokeniser::isReservedKeyword | ( | const String & | token | ) |

static noexcept

This is a handy method for checking whether a string is a c++ reserved keyword.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited