summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2018-07-09 10:05:41 +0000
committerSam McCall <sam.mccall@gmail.com>2018-07-09 10:05:41 +0000
commit6be3824721c1eb94b15f44764d07067083c086a0 (patch)
tree3c457820b84eb8f2048e35ee4a11de21e717abad /lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py
parentc69944c6b0f88dffdeb43bc12795af4b209d1385 (diff)
downloadbcm5719-llvm-6be3824721c1eb94b15f44764d07067083c086a0.tar.gz
bcm5719-llvm-6be3824721c1eb94b15f44764d07067083c086a0.zip
Lift JSON library from clang-tools-extra/clangd to llvm/Support.
Summary: This consists of four main parts: - an type json::Expr representing JSON values of dynamic kind, which can be composed, inspected, and modified - a JSON parser from string -> json::Expr - a JSON printer from json::Expr -> string, with optional pretty-printing - a convention for mapping json::Expr <=> native types (fromJSON/toJSON) Mapping functions are provided for primitives (e.g. int, vector) and the ObjectMapper helper helps implement fromJSON for struct/object types. Based on clangd's usage, a couple of places I'd appreciate review attention: - fromJSON returns only bool. A richer error-signaling mechanism may be useful to provide useful messages, or let recursive fromJSONs (containers/structs) do careful error recovery. - should json::obj be always explicitly written (like json::ary) - there's no streaming parse API. I suspect there are some simple wins like a callback API where the document is a long array, and each element is small. But this can probably be bolted on easily when we see the need. Reviewers: bkramer, labath Subscribers: mgorny, ilya-biryukov, ioeric, MaskRay, llvm-commits Differential Revision: https://reviews.llvm.org/D45753 llvm-svn: 336534
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud