Successfully implemented SemanticTokens communication between the client and server.
This commit is contained in:
@@ -19,6 +19,18 @@ struct ParsedAST {
|
||||
llvm::StringRef content,
|
||||
std::vector<const char*>& args,
|
||||
Preamble* preamble = nullptr);
|
||||
|
||||
clang::FileID getFileID(llvm::StringRef filename) const {
|
||||
auto entry = fileManager.getFileRef(filename);
|
||||
if(!entry) {
|
||||
// TODO:
|
||||
}
|
||||
return sourceManager.translateFile(entry.get());
|
||||
}
|
||||
|
||||
llvm::ArrayRef<clang::syntax::Token> spelledTokens(clang::FileID fileID) const {
|
||||
return tokenBuffer.spelledTokens(fileID);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace clice
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <llvm/ADT/StringMap.h>
|
||||
#include <Support/JSON.h>
|
||||
#include <AST/Preamble.h>
|
||||
@@ -17,7 +19,7 @@ private:
|
||||
};
|
||||
|
||||
public:
|
||||
void dispatch(std::string_view method, json::Value value);
|
||||
void dispatch(json::Value id, std::string_view method, json::Value value);
|
||||
|
||||
private:
|
||||
llvm::StringMap<TU> files;
|
||||
|
||||
Reference in New Issue
Block a user