MCPcopy Create free account
hub / github.com/dhbloo/rapfi / parse_inline_table

Function parse_inline_table

Rapfi/external/cpptoml/include/cpptoml.h:3097–3122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3095 }
3096
3097 std::shared_ptr<table> parse_inline_table(std::string::iterator& it,
3098 std::string::iterator& end)
3099 {
3100 auto tbl = make_table();
3101 do
3102 {
3103 ++it;
3104 if (it == end)
3105 throw_parse_exception("Unterminated inline table");
3106
3107 consume_whitespace(it, end);
3108 if (it != end && *it != '}')
3109 {
3110 parse_key_value(it, end, tbl.get());
3111 consume_whitespace(it, end);
3112 }
3113 } while (*it == ',');
3114
3115 if (it == end || *it != '}')
3116 throw_parse_exception("Unterminated inline table");
3117
3118 ++it;
3119 consume_whitespace(it, end);
3120
3121 return tbl;
3122 }
3123
3124 void skip_whitespace_and_comments(std::string::iterator& start,
3125 std::string::iterator& end)

Callers 1

parse_valueFunction · 0.85

Calls 5

make_tableFunction · 0.85
throw_parse_exceptionFunction · 0.85
consume_whitespaceFunction · 0.85
parse_key_valueFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected