| 3044 | |
| 3045 | template <class Value> |
| 3046 | std::shared_ptr<array> parse_value_array(std::string::iterator& it, |
| 3047 | std::string::iterator& end) |
| 3048 | { |
| 3049 | auto arr = make_array(); |
| 3050 | while (it != end && *it != ']') |
| 3051 | { |
| 3052 | auto val = parse_value(it, end); |
| 3053 | if (auto v = val->as<Value>()) |
| 3054 | arr->get().push_back(val); |
| 3055 | else |
| 3056 | throw_parse_exception("Arrays must be homogeneous"); |
| 3057 | skip_whitespace_and_comments(it, end); |
| 3058 | if (*it != ',') |
| 3059 | break; |
| 3060 | ++it; |
| 3061 | skip_whitespace_and_comments(it, end); |
| 3062 | } |
| 3063 | if (it != end) |
| 3064 | ++it; |
| 3065 | return arr; |
| 3066 | } |
| 3067 | |
| 3068 | template <class Object, class Function> |
| 3069 | std::shared_ptr<Object> parse_object_array(Function&& fun, char delim, |
nothing calls this directly
no test coverage detected