Sets the map from EO token to VSCode token types and initializes the semantic legend of Semantic Highlighter
Capabilities of the semantic tokens client
The VSCode tokens types used in the EO semantic highlighting
Keep a separate semantic token builder per file Each builder keeps track of the semantic tokens in a file
A map from EO's g4 grammar token types into token types supported by VS Code
For every token in EO's grammar, checks if it is mapped to VSCode token types and, if so, add that token type to the Semantic Tokens Legend of the grammar.
Capabilities of the semantic highlighting feature
Creates a new Semantic Tokens Builder for the given document if it does not already have one, and caches it.
Text document for which to create the new Semantic Tokens Builder
Pushes into a SemanticTokensBuilder the semantic tokens obtained from a text document
SemanticTokensBuilder to be populated with the semantic tokens of the given document
TextDocument to be semanticaly highlighted
Returns a SemanticTokensBuilder for a modified text document
TextDocument to be semanticaly highlighted
The ID of the previous semantic analysis performed on the document
Obtains the semantic tokens for a given text document.
Firstly, the document is tokenized through the EO's parser. Secondly, each token receives a VSCode token type depending on which grammar token it is. If no VSCode token is a match, then its token code is set to -1.
Text Document to be semanticaly tokenized
Generated using TypeDoc
Responsible for dealing with semantic highlighting operations