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

Function parse_string

Rapfi/external/cpptoml/include/cpptoml.h:2385–2405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2383 }
2384
2385 std::shared_ptr<value<std::string>> parse_string(std::string::iterator& it,
2386 std::string::iterator& end)
2387 {
2388 auto delim = *it;
2389 assert(delim == '"' || delim == '\'');
2390
2391 // end is non-const here because we have to be able to potentially
2392 // parse multiple lines in a string, not just one
2393 auto check_it = it;
2394 ++check_it;
2395 if (check_it != end && *check_it == delim)
2396 {
2397 ++check_it;
2398 if (check_it != end && *check_it == delim)
2399 {
2400 it = ++check_it;
2401 return parse_multiline_string(it, end, delim);
2402 }
2403 }
2404 return make_value<std::string>(string_literal(it, end, delim));
2405 }
2406
2407 std::shared_ptr<value<std::string>>
2408 parse_multiline_string(std::string::iterator& it,

Callers 1

parse_valueFunction · 0.85

Calls 2

parse_multiline_stringFunction · 0.85
string_literalFunction · 0.85

Tested by

no test coverage detected