This revision was automatically updated to reflect the committed changes.
Closed by commit rL318774: [clangd] Add parsing and value inspection to
JSONExpr. (authored by sammccall).
Repository:
rL LLVM
https://reviews.llvm.org/D40182
Files:
clang-tools-extra/trunk/clangd/JSONExpr.cpp
clang
ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.
lg
https://reviews.llvm.org/D40182
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
sammccall updated this revision to Diff 123794.
sammccall added a comment.
Address comment.
https://reviews.llvm.org/D40182
Files:
clangd/JSONExpr.cpp
clangd/JSONExpr.h
unittests/clangd/JSONExprTests.cpp
Index: unittests/clangd/JSONExprTests.cpp
==
sammccall added inline comments.
Comment at: clangd/JSONExpr.h:62
+// Array and Object also have typed indexing accessors for easy traversal:
+// if (json::obj* Opts = O.array("options"))
+// if (Optional Font = Opts->string("font"))
ioeric wrote:
> It's no
ioeric added a comment.
Code looks good. Just some nits.
Comment at: clangd/JSONExpr.h:62
+// Array and Object also have typed indexing accessors for easy traversal:
+// if (json::obj* Opts = O.array("options"))
+// if (Optional Font = Opts->string("font"))
--
sammccall created this revision.
Herald added a subscriber: ilya-biryukov.
This will replace the places where we're using YAMLParser to parse JSON now:
- the new marshalling code (T::parse()) should handle fewer cases and require
fewer explicit casts
- we'll early-reject invalid JSON that YAMLPa