JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
juce::CPlusPlusCodeTokeniser Class Reference

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

#include "juce_CPlusPlusCodeTokeniser.h"

Inheritance diagram for juce::CPlusPlusCodeTokeniser:
juce::CodeTokeniser

Public Types

enum  TokenType {
  tokenType_error , 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

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.
 

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.
 

Detailed Description

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

See also
CodeEditorComponent, CodeDocument

@tags{GUI}

Definition at line 37 of file juce_CPlusPlusCodeTokeniser.h.

Member Enumeration Documentation

◆ TokenType

The token values returned by this tokeniser.

Definition at line 52 of file juce_CPlusPlusCodeTokeniser.h.

Constructor & Destructor Documentation

◆ CPlusPlusCodeTokeniser()

juce::CPlusPlusCodeTokeniser::CPlusPlusCodeTokeniser ( )

Definition at line 30 of file juce_CPlusPlusCodeTokeniser.cpp.

◆ ~CPlusPlusCodeTokeniser()

juce::CPlusPlusCodeTokeniser::~CPlusPlusCodeTokeniser ( )
override

Definition at line 31 of file juce_CPlusPlusCodeTokeniser.cpp.

Member Function Documentation

◆ getDefaultColourScheme()

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

Returns a suggested syntax highlighting colour scheme.

Implements juce::CodeTokeniser.

Definition at line 38 of file juce_CPlusPlusCodeTokeniser.cpp.

◆ isReservedKeyword()

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

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

Definition at line 69 of file juce_CPlusPlusCodeTokeniser.cpp.

◆ readNextToken()

int juce::CPlusPlusCodeTokeniser::readNextToken ( CodeDocument::Iterator &  source)
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 juce::CodeTokeniser.

Definition at line 33 of file juce_CPlusPlusCodeTokeniser.cpp.


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