MCPcopy Create free account
hub / github.com/MaskRay/ccls / iterArray

Method iterArray

src/serializer.cc:28–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace ccls {
27
28void JsonReader::iterArray(llvm::function_ref<void()> fn) {
29 if (!m->IsArray())
30 throw std::invalid_argument("array");
31 // Use "0" to indicate any element for now.
32 path_.push_back("0");
33 for (auto &entry : m->GetArray()) {
34 auto saved = m;
35 m = &entry;
36 fn();
37 m = saved;
38 }
39 path_.pop_back();
40}
41void JsonReader::member(const char *name, llvm::function_ref<void()> fn) {
42 path_.push_back(name);
43 auto it = m->FindMember(name);

Callers 2

reflectFunction · 0.80
reflectFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected