CompilationUnitManager.GetTokenization(TextDocumentIdentifier) Method

Definition

Gets the current tokenization of the file content in memory. Each returned array item contains the array of tokens on the line with the corresponding index.

public Microsoft.Quantum.QsCompiler.SyntaxTokens.QsFragmentKind?[][]? GetTokenization (Microsoft.VisualStudio.LanguageServer.Protocol.TextDocumentIdentifier textDocument);
member this.GetTokenization : Microsoft.VisualStudio.LanguageServer.Protocol.TextDocumentIdentifier -> Microsoft.Quantum.QsCompiler.SyntaxTokens.QsFragmentKind[][]
Public Function GetTokenization (textDocument As TextDocumentIdentifier) As QsFragmentKind()()

Parameters

textDocument
TextDocumentIdentifier

Returns

QsFragmentKind[][]

The current tokenization of the file content in memory, or null if textDocument is not listed as a source file.

Remarks

Waits for all currently running or queued tasks to finish before getting the file content by calling FlushAndExecute<T>(Func<T>).

Applies to