MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / _parse_object

Function _parse_object

externals/picojson/picojson.h:837–854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835}
836
837template <typename Context, typename Iter> inline bool _parse_object(Context &ctx, input<Iter> &in) {
838 if (!ctx.parse_object_start()) {
839 return false;
840 }
841 if (in.expect('}')) {
842 return ctx.parse_object_stop();
843 }
844 do {
845 std::string key;
846 if (!in.expect('"') || !_parse_string(key, in) || !in.expect(':')) {
847 return false;
848 }
849 if (!ctx.parse_object_item(in, key)) {
850 return false;
851 }
852 } while (in.expect(','));
853 return in.expect('}') && ctx.parse_object_stop();
854}
855
856template <typename Iter> inline std::string _parse_number(input<Iter> &in) {
857 std::string num_str;

Callers 1

_parseFunction · 0.85

Calls 5

_parse_stringFunction · 0.85
expectMethod · 0.80
parse_object_startMethod · 0.45
parse_object_stopMethod · 0.45
parse_object_itemMethod · 0.45

Tested by

no test coverage detected