Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::editor::LanguageDefinition Struct Reference

Definition of a programming language's syntax for highlighting. More...

#include "donner/editor/TextEditorCore.h"

Public Types

using TokenRegexString
 Pattern and palette color for one token class.
using TokenRegexStrings = std::vector<TokenRegexString>
 Ordered regex token classes.
using TokenizeCallback
 Callback that identifies the next token in a character range.

Static Public Member Functions

static const LanguageDefinition & SVG ()
 Get the SVG language definition.

Public Attributes

RcString name
 Language name.
Keywords keywords
 Language keywords.
Identifiers identifiers
 Known identifiers.
RcString commentStart
 Multi-line comment start.
RcString commentEnd
 Multi-line comment end.
RcString singleLineComment
 Single-line comment marker.
bool autoIndentation = true
 Whether to enable auto-indentation.
TokenizeCallback tokenize
 Custom tokenization callback.
TokenRegexStrings tokenRegexStrings
 Regex patterns for syntax.
bool caseSensitive = true
 Whether keywords are case-sensitive.

Detailed Description

Definition of a programming language's syntax for highlighting.

Member Typedef Documentation

◆ TokenizeCallback

Initial value:
std::function<bool(const char* inBegin, const char* inEnd, const char*& outBegin,
const char*& outEnd, ColorIndex& paletteIndex)>
ColorIndex
Color indices for different syntax elements.
Definition TextBuffer.h:56

Callback that identifies the next token in a character range.

◆ TokenRegexString

Initial value:
std::pair<std::string, ColorIndex>

Pattern and palette color for one token class.


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