KSyntaxHighlighting
abstracthighlighter.cpp
146 if (!d->switchContext(stateData, stateData->topContext()->lineEmptyContext(), QStringList(), newState, isSharedData)) {
160 qCDebug(Log) << "Endless switch context transitions for line empty context, aborting highlighting of line.";
178 * - 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
179 * - have capturesForLastDynamicSkipOffset as guard for dynamic regexes to invalidate the cache if they might have changed
324 d->switchContext(stateData, rule->context(), std::move(newResult.captures()), newState, isSharedData);
329 d->switchContext(stateData, rule->context(), std::move(newResult.captures()), newState, isSharedData);
330 newFormat = rule->attributeFormat().isValid() ? &rule->attributeFormat() : &stateData->topContext()->attributeFormat();
342 d->switchContext(stateData, stateData->topContext()->fallthroughContext(), QStringList(), newState, isSharedData);
389 if (!d->switchContext(stateData, stateData->topContext()->lineEndContext(), QStringList(), newState, isSharedData)) {
396 qCDebug(Log) << "Endless switch context transitions for line end context, aborting highlighting of line.";
405bool 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:69
Theme theme() const
Returns the currently selected theme for highlighting.
Definition abstracthighlighter.cpp:75
virtual void setTheme(const Theme &theme)
Sets the theme used for highlighting.
Definition abstracthighlighter.cpp:81
virtual void applyFolding(int offset, int length, FoldingRegion region)
Reimplement this to apply folding to your output.
Definition abstracthighlighter.cpp:433
Definition definition() const
Returns the syntax definition used for highlighting.
Definition abstracthighlighter.cpp:64
State highlightLine(QStringView text, const State &state)
Highlight the given line.
Definition abstracthighlighter.cpp:101
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 Tue Mar 26 2024 11:19:29 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:29 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.