| 799 | } |
| 800 | |
| 801 | static bool |
| 802 | parser_parse(parser_t *parser) { |
| 803 | if (parser_tokenize(parser)) { |
| 804 | goto label_error; |
| 805 | } |
| 806 | if (parser_parse_value(parser)) { |
| 807 | goto label_error; |
| 808 | } |
| 809 | |
| 810 | if (parser_tokenize(parser)) { |
| 811 | goto label_error; |
| 812 | } |
| 813 | switch (parser->token.token_type) { |
| 814 | case TOKEN_TYPE_EOI: |
| 815 | return false; |
| 816 | default: |
| 817 | goto label_error; |
| 818 | } |
| 819 | not_reached(); |
| 820 | |
| 821 | label_error: |
| 822 | token_error(&parser->token); |
| 823 | return true; |
| 824 | } |
| 825 | |
| 826 | TEST_BEGIN(test_json_parser) { |
| 827 | size_t i; |
no test coverage detected