diff options
Diffstat (limited to 'clang-tools-extra/clangd/JSONRPCDispatcher.h')
| -rw-r--r-- | clang-tools-extra/clangd/JSONRPCDispatcher.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang-tools-extra/clangd/JSONRPCDispatcher.h b/clang-tools-extra/clangd/JSONRPCDispatcher.h index 502b5a3f746..3c0387ca2ef 100644 --- a/clang-tools-extra/clangd/JSONRPCDispatcher.h +++ b/clang-tools-extra/clangd/JSONRPCDispatcher.h @@ -10,13 +10,13 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_JSONRPCDISPATCHER_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_JSONRPCDISPATCHER_H -#include "JSONExpr.h" #include "Logger.h" #include "Protocol.h" #include "Trace.h" #include "clang/Basic/LLVM.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringMap.h" +#include "llvm/Support/JSON.h" #include <iosfwd> #include <mutex> @@ -34,7 +34,7 @@ public: : Pretty(Pretty), Outs(Outs), Logs(Logs), InputMirror(InputMirror) {} /// Emit a JSONRPC message. - void writeMessage(const json::Expr &Result); + void writeMessage(const llvm::json::Value &Result); /// Write a line to the logging stream. void log(const Twine &Message) override; @@ -57,20 +57,20 @@ private: /// Sends a successful reply. /// Current context must derive from JSONRPCDispatcher::Handler. -void reply(json::Expr &&Result); +void reply(llvm::json::Value &&Result); /// Sends an error response to the client, and logs it. /// Current context must derive from JSONRPCDispatcher::Handler. void replyError(ErrorCode code, const llvm::StringRef &Message); /// Sends a request to the client. /// Current context must derive from JSONRPCDispatcher::Handler. -void call(llvm::StringRef Method, json::Expr &&Params); +void call(llvm::StringRef Method, llvm::json::Value &&Params); /// Main JSONRPC entry point. This parses the JSONRPC "header" and calls the /// registered Handler for the method received. class JSONRPCDispatcher { public: // A handler responds to requests for a particular method name. - using Handler = std::function<void(const json::Expr &)>; + using Handler = std::function<void(const llvm::json::Value &)>; /// Create a new JSONRPCDispatcher. UnknownHandler is called when an unknown /// method is received. @@ -81,7 +81,7 @@ public: void registerHandler(StringRef Method, Handler H); /// Parses a JSONRPC message and calls the Handler for it. - bool call(const json::Expr &Message, JSONOutput &Out) const; + bool call(const llvm::json::Value &Message, JSONOutput &Out) const; private: llvm::StringMap<Handler> Handlers; |

