[PATCH] D33201: [ClangD] Refactor ProtocolHandlers to decouple them from ClangdLSPServer
Krasimir Georgiev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 16 02:55:53 PDT 2017
krasimir added inline comments.
================
Comment at: clangd/ClangdLSPServer.cpp:206
-std::vector<CompletionItem> ClangdLSPServer::codeComplete(PathRef File,
- Position Pos) {
- return Server.codeComplete(File, Pos);
+ // Set up JSONRPCDispatcher
+ LSPProtocolCallbacks Callbacks(*this);
----------------
nit: .
================
Comment at: clangd/ClangdLSPServer.cpp:211
+
+ // Run the Language Server loop
+ runLanguageServerLoop(In, Out, Dispatcher, IsDone);
----------------
nit: .
================
Comment at: clangd/ClangdLSPServer.h:33
+ /// each instance of ClangdLSPServer.
+ void run(std::istream &In);
----------------
It seems strange to have the In here and the Out in the constructor.
================
Comment at: clangd/ClangdLSPServer.h:49
JSONOutput &Out;
+ bool IsDone = false;
ClangdServer Server;
----------------
This deserves a comment.
https://reviews.llvm.org/D33201
More information about the cfe-commits
mailing list