[SourceKit] Add a request to get the semantic tokens of a file

We need this request for semantic highlighting in LSP. Previously, we were getting the semantic tokens using a 0,0 edit after a document update notification but that will no longer be possible if we open the documents in syntactic only mode.
This commit is contained in:
Alex Hoppen
2023-10-19 14:34:08 -07:00
parent 1560e08d04
commit 4bc03f8392
11 changed files with 206 additions and 33 deletions

View File

@@ -1537,9 +1537,9 @@ public:
}
};
static SourceFile *retrieveInputFile(StringRef inputBufferName,
const CompilerInstance &CI,
bool haveRealPath = false) {
SourceFile *SourceKit::retrieveInputFile(StringRef inputBufferName,
const CompilerInstance &CI,
bool haveRealPath) {
// Don't bother looking up if we have the same file as the primary file or
// we weren't given a separate input file
if (inputBufferName.empty() ||