package semtok
import "cuelang.org/go/internal/golangorgx/gopls/protocol/semtok"
The semtok package provides an encoder for LSP's semantic tokens.
Index ¶
- func Encode( tokens []Token, noStrings, noNumbers bool, types, modifiers []string) []uint32
- type Token
- type TokenType
Functions ¶
func Encode ¶
Encode returns the LSP encoding of a sequence of tokens. The noStrings, noNumbers options cause strings, numbers to be skipped. The lists of types and modifiers determines the bitfield encoding.
Types ¶
type Token ¶
A Token provides the extent and semantics of a token.
type TokenType ¶
type TokenType string
const ( TokNamespace TokenType = "namespace" TokType TokenType = "type" TokInterface TokenType = "interface" TokTypeParam TokenType = "typeParameter" TokParameter TokenType = "parameter" TokVariable TokenType = "variable" TokMethod TokenType = "method" TokFunction TokenType = "function" TokKeyword TokenType = "keyword" TokComment TokenType = "comment" TokString TokenType = "string" TokNumber TokenType = "number" TokOperator TokenType = "operator" TokMacro TokenType = "macro" // for templates )
Source Files ¶
semtok.go
- Version
- v0.12.0 (latest)
- Published
- Jan 30, 2025
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 8 hours ago –
Tools for package owners.