Table of Contents

Class SemanticTokenLegend

Namespace
RDCore.SDK.Model.Source
Assembly
RDCore.SDK.dll

The legend of the semantic tokens the platform serves (LSP 3.17 §Semantic Tokens): the token types and token modifiers the integers of a textDocument/semanticTokens answer index into.

public static class SemanticTokenLegend
Inheritance
SemanticTokenLegend
Inherited Members

Remarks

Every entry is one of the standard token types and modifiers of the protocol, so that a client that knows none of the platform's themes still shows something sensible. The server declares the legend in its capabilities, and a client that decodes an answer reads it from there; this is the one place that says what it is.

Fields

Declaration

The modifier of a name where it is declared, as a bit.

public const int Declaration = 2

Field Value

int

ReadOnly

The modifier of a name that is a constant, as a bit.

public const int ReadOnly = 1

Field Value

int

Properties

TokenModifiers

The token modifiers, in the order their bit is the one in an answer.

public static IReadOnlyList<string> TokenModifiers { get; }

Property Value

IReadOnlyList<string>

TokenTypes

The token types, in the order their index is the one in an answer.

public static IReadOnlyList<string> TokenTypes { get; }

Property Value

IReadOnlyList<string>

Methods

TypeOf(SyntaxTokenKind)

The index in TokenTypes of the type of a token.

public static int TypeOf(SyntaxTokenKind kind)

Parameters

kind SyntaxTokenKind

What the token is.

Returns

int