MCPcopy Create free account
hub / github.com/build2/build2 / json_array_assign

Function json_array_assign

libbuild2/variable.cxx:2277–2298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2275 }
2276
2277 static void
2278 json_array_assign (value& v, names&& ns, const variable* var)
2279 {
2280 using traits = value_traits<json_array>;
2281
2282 try
2283 {
2284 traits::assign (v, traits::convert (move (ns)));
2285 }
2286 catch (const invalid_argument& e)
2287 {
2288 // Note: ns is not guaranteed to be valid.
2289 //
2290 diag_record dr (fail);
2291 dr << "invalid json array";
2292
2293 if (var != nullptr)
2294 dr << " in variable " << var->name;
2295
2296 dr << ": " << e;
2297 }
2298 }
2299
2300 static void
2301 json_array_append (value& v, names&& ns, const variable* var)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected