| 315 | [[noreturn]] void throwError (const char* error) { throwError (error, current); } |
| 316 | |
| 317 | value::Value parseTopLevel() |
| 318 | { |
| 319 | skipWhitespace(); |
| 320 | |
| 321 | if (popIf ('[')) return parseArray(); |
| 322 | if (popIf ('{')) return parseObject(); |
| 323 | if (! isEOF()) throwError ("Expected an object or array"); |
| 324 | return {}; |
| 325 | } |
| 326 | |
| 327 | value::Value parseArray() |
| 328 | { |