Fix Reflection.h.

This commit is contained in:
ykiko
2024-09-11 18:41:12 +08:00
parent 90dfc40665
commit bdafccbce6
9 changed files with 117 additions and 23 deletions

View File

@@ -1,2 +1,19 @@
#include <Server/Scheduler.h>
#include <Protocol/Protocol.h>
#include <spdlog/spdlog.h>
namespace clice {
void Scheduler::dispatch(std::string_view method, json::Value value) {
if(method == "textDocument/didOpen") {
auto params = json::deserialize<protocol::DidOpenTextDocumentParams>(value);
} else if(method == "textDocument/didChange") {
auto params = json::deserialize<protocol::DidChangeTextDocumentParams>(value);
} else if(method == "textDocument/semanticTokens/full") {
auto params = json::deserialize<protocol::SemanticTokensParams>(value);
} else {
spdlog::error("unknown method: {}", method);
}
}
} // namespace clice