Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QmlHighlighting Namespace Reference

Namespaces

namespace  Utils

Classes

class  HighlightingVisitor
struct  HighlightsRange
struct  HighlightToken

Typedefs

using HighlightsContainer = QMap<int, HighlightToken>
using QmlHighlightKindToLspKind = int (*)(QmlHighlightKind)

Enumerations

enum class  QmlHighlightKind {
  QmlKeyword , QmlType , QmlImportId , QmlNamespace ,
  QmlLocalId , QmlExternalId , QmlProperty , QmlScopeObjectProperty ,
  QmlRootObjectProperty , QmlExternalObjectProperty , QmlMethod , QmlMethodParameter ,
  QmlSignal , QmlSignalHandler , QmlEnumName , QmlEnumMember ,
  QmlPragmaName , QmlPragmaValue , QmlTypeModifier , JsImport ,
  JsGlobalVar , JsGlobalMethod , JsScopeVar , JsLabel ,
  Number , String , Comment , Operator ,
  Field , Unknown
}
enum class  QmlHighlightModifier {
  None = 0 , QmlPropertyDefinition = 1 << 0 , QmlDefaultProperty = 1 << 1 , QmlFinalProperty = 1 << 2 ,
  QmlRequiredProperty = 1 << 3 , QmlReadonlyProperty = 1 << 4
}
enum class  HighlightingMode { Default , QtCHighlighting }
enum class  SemanticTokenProtocolTypes {
  Namespace , Type , Enum , Parameter ,
  Variable , Property , EnumMember , Method ,
  Keyword , Comment , String , Number ,
  Regexp , Operator , Decorator , QmlLocalId ,
  QmlExternalId , QmlRootObjectProperty , QmlScopeObjectProperty , QmlExternalObjectProperty ,
  JsScopeVar , JsImportVar , JsGlobalVar , QmlStateName ,
  Field , Unknown
}

Functions

static int mapToProtocolForQtCreator (QmlHighlightKind highlightKind)
static int mapToProtocolDefault (QmlHighlightKind highlightKind)
static std::optional< QmlHighlightKindresolveJsGlobalObjectKind (const DomItem &item, const QString &name)
 Further resolves the type of a JavaScriptIdentifier A global object can be in the object form or in the function form. For example, Date can be used as a constructor function (like new Date()) or as a object (like Date.now()).
static int fromQmlModifierKindToLspTokenType (QmlHighlightModifiers highlightModifier)
static FieldFilter highlightingFilter ()

Typedef Documentation

◆ HighlightsContainer

◆ QmlHighlightKindToLspKind

Enumeration Type Documentation

◆ HighlightingMode

Enumerator
Default 
QtCHighlighting 

Definition at line 79 of file qqmlsemantictokens_p.h.

◆ QmlHighlightKind

Enumerator
QmlKeyword 
QmlType 
QmlImportId 
QmlNamespace 
QmlLocalId 
QmlExternalId 
QmlProperty 
QmlScopeObjectProperty 
QmlRootObjectProperty 
QmlExternalObjectProperty 
QmlMethod 
QmlMethodParameter 
QmlSignal 
QmlSignalHandler 
QmlEnumName 
QmlEnumMember 
QmlPragmaName 
QmlPragmaValue 
QmlTypeModifier 
JsImport 
JsGlobalVar 
JsGlobalMethod 
JsScopeVar 
JsLabel 
Number 
String 
Comment 
Operator 
Field 
Unknown 

Definition at line 35 of file qqmlsemantictokens_p.h.

◆ QmlHighlightModifier

Enumerator
None 
QmlPropertyDefinition 
QmlDefaultProperty 
QmlFinalProperty 
QmlRequiredProperty 
QmlReadonlyProperty 

Definition at line 68 of file qqmlsemantictokens_p.h.

◆ SemanticTokenProtocolTypes

Enumerator
Namespace 
Type 
Enum 
Parameter 
Variable 
Property 
EnumMember 
Method 
Keyword 
Comment 
String 
Number 
Regexp 
Operator 
Decorator 
QmlLocalId 
QmlExternalId 
QmlRootObjectProperty 
QmlScopeObjectProperty 
QmlExternalObjectProperty 
JsScopeVar 
JsImportVar 
JsGlobalVar 
QmlStateName 
Field 
Unknown 

Definition at line 86 of file qqmlsemantictokens_p.h.

Function Documentation

◆ fromQmlModifierKindToLspTokenType()

int QmlHighlighting::fromQmlModifierKindToLspTokenType ( QmlHighlightModifiers highlightModifier)
static

Definition at line 191 of file qqmlsemantictokens.cpp.

◆ highlightingFilter()

FieldFilter QmlHighlighting::highlightingFilter ( )
static

Definition at line 215 of file qqmlsemantictokens.cpp.

◆ mapToProtocolDefault()

◆ mapToProtocolForQtCreator()

◆ resolveJsGlobalObjectKind()

std::optional< QmlHighlightKind > QmlHighlighting::resolveJsGlobalObjectKind ( const DomItem & item,
const QString & name )
static

Further resolves the type of a JavaScriptIdentifier A global object can be in the object form or in the function form. For example, Date can be used as a constructor function (like new Date()) or as a object (like Date.now()).

Definition at line 156 of file qqmlsemantictokens.cpp.

References JsGlobalMethod, and JsGlobalVar.