| 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, |
no test coverage detected