KSyntaxHighlighting
definition.cpp
94 d->translatedName = QCoreApplication::instance()->translate("Language", d->nameUtf8.isEmpty() ? d->name.toUtf8().constData() : d->nameUtf8.constData());
222 std::sort(formatList.begin(), formatList.end(), [](const KSyntaxHighlighting::Format &lhs, const KSyntaxHighlighting::Format &rhs) {
507 caseSensitive = Xml::attrToBool(reader.attributes().value(QLatin1String("casesensitive"))) ? Qt::CaseSensitive : Qt::CaseInsensitive;
625 // when a context includes a folding region this value is Yes, otherwise it remains undetermined
675 caseSensitive = Xml::attrToBool(reader.attributes().value(QLatin1String("casesensitive"))) ? Qt::CaseSensitive : Qt::CaseInsensitive;
691 indentationBasedFolding = Xml::attrToBool(reader.attributes().value(QLatin1String("indentationsensitive")));
732 const bool isSingleLine = reader.attributes().value(QLatin1String("name")) == QLatin1String("singleLine");
735 const bool afterWhiteSpace = reader.attributes().value(QLatin1String("position")) == QLatin1String("afterwhitespace");
736 singleLineCommentPosition = afterWhiteSpace ? CommentPosition::AfterWhitespace : CommentPosition::StartOfLine;
830 qCWarning(Log) << "Skipping" << fileName << "due to having no valid kateversion attribute:" << verStr;
836 if (major > KSYNTAXHIGHLIGHTING_VERSION_MAJOR || (major == KSYNTAXHIGHLIGHTING_VERSION_MAJOR && minor > KSYNTAXHIGHLIGHTING_VERSION_MINOR)) {
850DefinitionData::ResolvedContext DefinitionData::resolveIncludedContext(QStringView defName, QStringView contextName)
860 if (std::find(immediateIncludedDefinitions.begin(), immediateIncludedDefinitions.end(), resolvedDef) == immediateIncludedDefinitions.end()) {
QStringList keywordList(const QString &name) const
Returns the list of keywords for the keyword list name.
Definition definition.cpp:197
QString singleLineCommentMarker() const
Returns the marker that starts a single line comment.
Definition definition.cpp:261
bool isValid() const
Checks whether this object refers to a valid syntax definition.
Definition definition.cpp:71
QStringList foldingIgnoreList() const
If indentationBasedFoldingEnabled() returns true, this function returns a list of regular expressions...
Definition definition.cpp:185
QString filePath() const
Returns the full path to the definition XML file containing the syntax definition.
Definition definition.cpp:76
Definition & operator=(Definition &&other) noexcept
Move assignment operator.
CommentPosition singleLineCommentPosition() const
Returns the insert position of the comment marker for sinle line comments.
Definition definition.cpp:267
bool isHidden() const
Returns true if this is an internal definition that should not be displayed to the user.
Definition definition.cpp:133
bool indentationBasedFoldingEnabled() const
Returns whether indentation-based folding is enabled.
Definition definition.cpp:179
QStringList alternativeNames() const
Alternate names the syntax can be referred to by.
Definition definition.cpp:86
Definition()
Default constructor, creating an empty (invalid) Definition instance.
Definition definition.cpp:44
QList< QString > mimeTypes() const
Mime types associated with this syntax definition.
Definition definition.cpp:113
bool operator!=(const Definition &other) const
Checks two definitions for inequality.
Definition definition.cpp:66
bool foldingEnabled() const
Returns whether the highlighting supports code folding.
Definition definition.cpp:170
bool setKeywordList(const QString &name, const QStringList &content)
Set the contents of the keyword list name to content.
Definition definition.cpp:204
bool operator==(const Definition &other) const
Checks two definitions for equality.
Definition definition.cpp:61
QPair< QString, QString > multiLineCommentMarker() const
Returns the markers that start and end multiline comments.
Definition definition.cpp:273
QList< QPair< QChar, QString > > characterEncodings() const
Returns a list of character/string mapping that can be used for spell checking.
Definition definition.cpp:279
bool isWordWrapDelimiter(QChar c) const
Returns whether it is safe to break a line at before the character .
Definition definition.cpp:164
bool isWordDelimiter(QChar c) const
Returns whether the character c is a word delimiter.
Definition definition.cpp:158
QList< QString > extensions() const
File extensions associated with this syntax definition.
Definition definition.cpp:118
QList< Format > formats() const
Returns a list of all Format items used by this definition.
Definition definition.cpp:216
QList< Definition > includedDefinitions() const
Returns a list of Definitions that are referenced with the IncludeRules rule.
Definition definition.cpp:229
Describes the format to be used for a specific text fragment.
Definition format.h:28
QString name() const
The name of this format as used in the syntax definition file.
Definition format.cpp:95
KCOREADDONS_EXPORT unsigned int version()
KIOCORE_EXPORT TransferJob * get(const QUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
QString name(StandardAction id)
Syntax highlighting engine for Kate syntax definitions.
Definition abstracthighlighter.h:17
@ AfterWhitespace
The comment marker is inserted after leading whitespaces right befire the first non-whitespace charac...
@ StartOfLine
The comment marker is inserted at the beginning of a line at column 0.
QCborValue value(QLatin1StringView key) const const
bool toBool(bool defaultValue) const const
QByteArray toByteArray(const QByteArray &defaultValue) const const
qint64 toInteger(qint64 defaultValue) const const
QString toString(const QString &defaultValue) const const
QCoreApplication * instance()
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
ReadOnly
reference back()
iterator begin()
iterator end()
reference front()
void pop_back()
void push_back(parameter_type value)
QString & insert(qsizetype position, QChar ch)
bool isEmpty() const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
qsizetype indexOf(QChar c, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QStringView sliced(qsizetype pos) const const
float toFloat(bool *ok) const const
int toInt(bool *ok, int base) const const
QString toString() const const
CaseSensitive
SkipEmptyParts
bool hasAttribute(QAnyStringView namespaceUri, QAnyStringView name) const const
QStringView value(QAnyStringView namespaceUri, QAnyStringView name) const const
StartElement
bool atEnd() const const
QXmlStreamAttributes attributes() const const
QStringView name() const const
TokenType readNext()
void skipCurrentElement()
TokenType tokenType() const const
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.