KSyntaxHighlighting
abstracthighlighter.cpp
148 if (!d->switchContext(stateData, stateData->topContext()->lineEmptyContext(), QStringList(), newState, isSharedData)) {
162 qCDebug(Log) << "Endless switch context transitions for line empty context, aborting highlighting of line.";
180 * - store the result of the first position that matches (or -1 for no match in the full line) in the skipOffsets hash for re-use
181 * - have capturesForLastDynamicSkipOffset as guard for dynamic regexes to invalidate the cache if they might have changed
326 d->switchContext(stateData, rule->context(), std::move(newResult.captures()), newState, isSharedData);
331 d->switchContext(stateData, rule->context(), std::move(newResult.captures()), newState, isSharedData);
332 newFormat = rule->attributeFormat().isValid() ? &rule->attributeFormat() : &stateData->topContext()->attributeFormat();
344 d->switchContext(stateData, stateData->topContext()->fallthroughContext(), QStringList(), newState, isSharedData);
391 if (!d->switchContext(stateData, stateData->topContext()->lineEndContext(), QStringList(), newState, isSharedData)) {
398 qCDebug(Log) << "Endless switch context transitions for line end context, aborting highlighting of line.";
407bool AbstractHighlighterPrivate::switchContext(StateData *&data, const ContextSwitch &contextSwitch, QStringList &&captures, State &state, bool &isSharedData)
Abstract base class for highlighters.
Definition abstracthighlighter.h:67
virtual void applyFormat(int offset, int length, const Format &format)=0
Reimplement this to apply formats to your output.
virtual void setDefinition(const Definition &def)
Sets the syntax definition used for highlighting.
Definition abstracthighlighter.cpp:71
Theme theme() const
Returns the currently selected theme for highlighting.
Definition abstracthighlighter.cpp:77
virtual void setTheme(const Theme &theme)
Sets the theme used for highlighting.
Definition abstracthighlighter.cpp:83
virtual void applyFolding(int offset, int length, FoldingRegion region)
Reimplement this to apply folding to your output.
Definition abstracthighlighter.cpp:435
Definition definition() const
Returns the syntax definition used for highlighting.
Definition abstracthighlighter.cpp:66
State highlightLine(QStringView text, const State &state)
Highlight the given line.
Definition abstracthighlighter.cpp:103
Represents a begin or end of a folding region.
Definition foldingregion.h:19
Describes the format to be used for a specific text fragment.
Definition format.h:28
Opaque handle to the state of the highlighting engine.
Definition state.h:30
Syntax highlighting engine for Kate syntax definitions.
Definition abstracthighlighter.h:17
bool isEmpty() const const
qsizetype length() const const
qsizetype size() const const
iterator begin()
void clear()
iterator end()
void push_back(T &&t)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.