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
Classes | Static Public Member Functions | List of all members
juce::CppTokeniserFunctions Struct Reference

Class containing some basic functions for simple tokenising of C++ code. More...

#include "juce_CPlusPlusCodeTokeniserFunctions.h"

Classes

struct  StringIterator
 A class that can be passed to the CppTokeniserFunctions functions in order to parse a String. More...
 

Static Public Member Functions

static bool isIdentifierStart (const juce_wchar c) noexcept
 
static bool isIdentifierBody (const juce_wchar c) noexcept
 
static bool isReservedKeyword (String::CharPointerType token, const int tokenLength) noexcept
 
template<typename Iterator >
static int parseIdentifier (Iterator &source) noexcept
 
template<typename Iterator >
static bool skipNumberSuffix (Iterator &source)
 
static bool isHexDigit (const juce_wchar c) noexcept
 
template<typename Iterator >
static bool parseHexLiteral (Iterator &source) noexcept
 
static bool isOctalDigit (const juce_wchar c) noexcept
 
template<typename Iterator >
static bool parseOctalLiteral (Iterator &source) noexcept
 
static bool isDecimalDigit (const juce_wchar c) noexcept
 
template<typename Iterator >
static bool parseDecimalLiteral (Iterator &source) noexcept
 
template<typename Iterator >
static bool parseFloatLiteral (Iterator &source) noexcept
 
template<typename Iterator >
static int parseNumber (Iterator &source)
 
template<typename Iterator >
static void skipQuotedString (Iterator &source) noexcept
 
template<typename Iterator >
static void skipComment (Iterator &source) noexcept
 
template<typename Iterator >
static void skipPreprocessorLine (Iterator &source) noexcept
 
template<typename Iterator >
static void skipIfNextCharMatches (Iterator &source, const juce_wchar c) noexcept
 
template<typename Iterator >
static void skipIfNextCharMatches (Iterator &source, const juce_wchar c1, const juce_wchar c2) noexcept
 
template<typename Iterator >
static int readNextToken (Iterator &source)
 
static void writeEscapeChars (OutputStream &out, const char *utf8, const int numBytesToRead, const int maxCharsOnLine, const bool breakAtNewLines, const bool replaceSingleQuotes, const bool allowStringBreaks)
 Takes a UTF8 string and writes it to a stream using standard C++ escape sequences for any non-ascii bytes.
 
static String addEscapeChars (const String &s)
 Takes a string and returns a version of it where standard C++ escape sequences have been used to replace any non-ascii bytes.
 

Detailed Description

Class containing some basic functions for simple tokenising of C++ code.

@tags{GUI}

Definition at line 34 of file juce_CPlusPlusCodeTokeniserFunctions.h.

Member Function Documentation

◆ addEscapeChars()

static String juce::CppTokeniserFunctions::addEscapeChars ( const String s)
static

Takes a string and returns a version of it where standard C++ escape sequences have been used to replace any non-ascii bytes.

Although not strictly a tokenising function, this is still a function that often comes in handy when working with C++ code!

See also
writeEscapeChars

Definition at line 666 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ isDecimalDigit()

static bool juce::CppTokeniserFunctions::isDecimalDigit ( const juce_wchar  c)
staticnoexcept

Definition at line 210 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ isHexDigit()

static bool juce::CppTokeniserFunctions::isHexDigit ( const juce_wchar  c)
staticnoexcept

Definition at line 152 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ isIdentifierBody()

static bool juce::CppTokeniserFunctions::isIdentifierBody ( const juce_wchar  c)
staticnoexcept

Definition at line 42 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ isIdentifierStart()

static bool juce::CppTokeniserFunctions::isIdentifierStart ( const juce_wchar  c)
staticnoexcept

Definition at line 36 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ isOctalDigit()

static bool juce::CppTokeniserFunctions::isOctalDigit ( const juce_wchar  c)
staticnoexcept

Definition at line 187 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ isReservedKeyword()

static bool juce::CppTokeniserFunctions::isReservedKeyword ( String::CharPointerType  token,
const int  tokenLength 
)
staticnoexcept

Definition at line 48 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ parseDecimalLiteral()

template<typename Iterator >
static bool juce::CppTokeniserFunctions::parseDecimalLiteral ( Iterator &  source)
staticnoexcept

Definition at line 216 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ parseFloatLiteral()

template<typename Iterator >
static bool juce::CppTokeniserFunctions::parseFloatLiteral ( Iterator &  source)
staticnoexcept

Definition at line 235 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ parseHexLiteral()

template<typename Iterator >
static bool juce::CppTokeniserFunctions::parseHexLiteral ( Iterator &  source)
staticnoexcept

Definition at line 160 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ parseIdentifier()

template<typename Iterator >
static int juce::CppTokeniserFunctions::parseIdentifier ( Iterator &  source)
staticnoexcept

Definition at line 111 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ parseNumber()

template<typename Iterator >
static int juce::CppTokeniserFunctions::parseNumber ( Iterator &  source)
static

Definition at line 298 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ parseOctalLiteral()

template<typename Iterator >
static bool juce::CppTokeniserFunctions::parseOctalLiteral ( Iterator &  source)
staticnoexcept

Definition at line 193 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ readNextToken()

template<typename Iterator >
static int juce::CppTokeniserFunctions::readNextToken ( Iterator &  source)
static

Definition at line 410 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ skipComment()

template<typename Iterator >
static void juce::CppTokeniserFunctions::skipComment ( Iterator &  source)
staticnoexcept

Definition at line 335 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ skipIfNextCharMatches() [1/2]

template<typename Iterator >
static void juce::CppTokeniserFunctions::skipIfNextCharMatches ( Iterator &  source,
const juce_wchar  c 
)
staticnoexcept

Definition at line 394 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ skipIfNextCharMatches() [2/2]

template<typename Iterator >
static void juce::CppTokeniserFunctions::skipIfNextCharMatches ( Iterator &  source,
const juce_wchar  c1,
const juce_wchar  c2 
)
staticnoexcept

Definition at line 401 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ skipNumberSuffix()

template<typename Iterator >
static bool juce::CppTokeniserFunctions::skipNumberSuffix ( Iterator &  source)
static

Definition at line 139 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ skipPreprocessorLine()

template<typename Iterator >
static void juce::CppTokeniserFunctions::skipPreprocessorLine ( Iterator &  source)
staticnoexcept

Definition at line 351 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ skipQuotedString()

template<typename Iterator >
static void juce::CppTokeniserFunctions::skipQuotedString ( Iterator &  source)
staticnoexcept

Definition at line 318 of file juce_CPlusPlusCodeTokeniserFunctions.h.

◆ writeEscapeChars()

static void juce::CppTokeniserFunctions::writeEscapeChars ( OutputStream out,
const char utf8,
const int  numBytesToRead,
const int  maxCharsOnLine,
const bool  breakAtNewLines,
const bool  replaceSingleQuotes,
const bool  allowStringBreaks 
)
static

Takes a UTF8 string and writes it to a stream using standard C++ escape sequences for any non-ascii bytes.

Although not strictly a tokenising function, this is still a function that often comes in handy when working with C++ code!

Note that addEscapeChars() is easier to use than this function if you're working with Strings.

See also
addEscapeChars

Definition at line 560 of file juce_CPlusPlusCodeTokeniserFunctions.h.


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