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

Function json_prepend

libbuild2/variable.cxx:1806–1827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1804 }
1805
1806 static void
1807 json_prepend (value& v, names&& ns, const variable* var)
1808 {
1809 using traits = value_traits<json_value>;
1810
1811 try
1812 {
1813 traits::prepend (v, traits::convert (move (ns)));
1814 }
1815 catch (const invalid_argument& e)
1816 {
1817 // Note: ns is not guaranteed to be valid.
1818 //
1819 diag_record dr (fail);
1820 dr << "invalid json value";
1821
1822 if (var != nullptr)
1823 dr << " in variable " << var->name;
1824
1825 dr << ": " << e;
1826 }
1827 }
1828
1829 name value_traits<json_value>::
1830 reverse (const json_value& v)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected