[PATCH] D40406: [clangd] Switch from YAMLParser to JSONExpr

2017-11-28 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE319159: [clangd] Switch from YAMLParser to JSONExpr (authored by sammccall). Changed prior to commit: https://reviews.llvm.org/D40406?vs=124163&id=124529#toc Repository: rCTE Clang Tools Extra htt

[PATCH] D40406: [clangd] Switch from YAMLParser to JSONExpr

2017-11-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D40406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D40406: [clangd] Switch from YAMLParser to JSONExpr

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/JSONRPCDispatcher.h:47 + // Whether output should be pretty-printed. + const bool Pretty; + ioeric wrote: > It seems that we are piggybacking a state of clangd with `JSONOutput`. It > might make sense to stor

[PATCH] D40406: [clangd] Switch from YAMLParser to JSONExpr

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 124163. sammccall marked an inline comment as done. sammccall added a comment. Herald added a subscriber: ilya-biryukov. Use llvm::toString https://reviews.llvm.org/D40406 Files: clangd/ClangdLSPServer.cpp clangd/JSONExpr.h clangd/JSONRPCDispatcher.

[PATCH] D40406: [clangd] Switch from YAMLParser to JSONExpr

2017-11-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/JSONRPCDispatcher.cpp:221 +Out.log("<-- " + JSONRef + "\n"); +handleAllErrors(Doc.takeError(), [&](const llvm::ErrorInfoBase &Err) { + Out.log(llvm::Twine("JSON parse error: ") + Err.message() + "\n");

[PATCH] D40406: [clangd] Switch from YAMLParser to JSONExpr

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall edited reviewers, added: ioeric; removed: ilya-biryukov. sammccall added a comment. Oops, Eric is most likely to have this stuff in cache :-) Sorry this is huge and ugly, -500 lines though! I think the `Protocol` code could be a lot tighter (there's still a lot of repeated "is this an

[PATCH] D40406: [clangd] Switch from YAMLParser to JSONExpr

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. - Converted Protocol.h parse() functions to take JSON::Expr. These no longer detect and log unknown fields, as this is not that useful and no longer free. I haven't changed the error handling too much: fields that were treated as optional before are still option