| 818 | } |
| 819 | |
| 820 | template <typename Context, typename Iter> inline bool _parse_array(Context &ctx, input<Iter> &in) { |
| 821 | if (!ctx.parse_array_start()) { |
| 822 | return false; |
| 823 | } |
| 824 | size_t idx = 0; |
| 825 | if (in.expect(']')) { |
| 826 | return ctx.parse_array_stop(idx); |
| 827 | } |
| 828 | do { |
| 829 | if (!ctx.parse_array_item(in, idx)) { |
| 830 | return false; |
| 831 | } |
| 832 | idx++; |
| 833 | } while (in.expect(',')); |
| 834 | return in.expect(']') && ctx.parse_array_stop(idx); |
| 835 | } |
| 836 | |
| 837 | template <typename Context, typename Iter> inline bool _parse_object(Context &ctx, input<Iter> &in) { |
| 838 | if (!ctx.parse_object_start()) { |
no test coverage detected