Donner 0.5.1
Embeddable browser-grade SVG2 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"

Collaboration diagram for donner::editor::LanguageDefinition:
[legend]

Public Types

using TokenRegexString = std::pair<std::string, ColorIndex>
using TokenRegexStrings = std::vector<TokenRegexString>
using TokenizeCallback

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

using donner::editor::LanguageDefinition::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

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