Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SemanticTokensBuilder

A semantic tokens builder can help with creating a SemanticTokens instance which contains delta encoded semantic tokens.

Hierarchy

  • SemanticTokensBuilder

Index

Constructors

Methods

Constructors

Methods

  • push(line: number, char: number, length: number, tokenType: number, tokenModifiers?: number): void
  • push(range: Range, tokenType: string, tokenModifiers?: readonly string[]): void
  • Add another token.

    Parameters

    • line: number

      The token start line number (absolute value).

    • char: number

      The token start character (absolute value).

    • length: number

      The token length in characters.

    • tokenType: number

      The encoded token type.

    • Optional tokenModifiers: number

      The encoded token modifiers.

    Returns void

  • Add another token. Use only when providing a legend.

    Parameters

    • range: Range

      The range of the token. Must be single-line.

    • tokenType: string

      The token type.

    • Optional tokenModifiers: readonly string[]

      The token modifiers.

    Returns void