KSyntaxHighlighting
7#include "contextswitch_p.h"
9#include "definition_p.h"
10#include "highlightingdata_p.hpp"
11#include "ksyntaxhighlighting_logging.h"
12#include "repository.h"
16void ContextSwitch::resolve(DefinitionData &def,
QStringView contextInstr)
18 HighlightingContextData::ContextSwitch ctx(contextInstr);
20 m_popCount = ctx.popCount();
21 m_isStay = !m_popCount;
23 auto contextName = ctx.contextName();
24 auto defName = ctx.defName();
26 if (contextName.isEmpty() && defName.isEmpty()) {
30 if (defName.isEmpty()) {
31 m_context = def.contextByName(contextName);
33 auto d = def.repo->definitionForName(defName.toString());
35 auto data = DefinitionData::get(d);
36 def.addImmediateIncludedDefinition(d);
38 if (contextName.isEmpty()) {
39 m_context = data->initialContext();
41 m_context = data->contextByName(contextName);
47 qCWarning(
Log) <<
"cannot find context" << contextName <<
"in" << def.name;
Syntax highlighting engine for Kate syntax definitions.
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
KDE's Doxygen guidelines are available online.