SemanticTokensBuilder

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

Online Documentation

Constructors

Link copied to clipboard
constructor(legend: SemanticTokensLegend = definedExternally)

Creates a semantic tokens builder.

Functions

Link copied to clipboard
fun build(resultId: String = definedExternally): SemanticTokens

Finish and create a SemanticTokens instance.

Link copied to clipboard
fun push(range: Range, tokenType: String, tokenModifiers: ReadonlyArray<JsString> = definedExternally)

Add another token. Use only when providing a legend.

fun push(line: Int, char: Int, length: Int, tokenType: Int, tokenModifiers: Int = definedExternally)

Add another token.