| 3126 | } |
| 3127 | |
| 3128 | bool Parser::Parse(const char *source, const char **include_paths, |
| 3129 | const char *source_filename) { |
| 3130 | const auto initial_depth = parse_depth_counter_; |
| 3131 | (void)initial_depth; |
| 3132 | bool r; |
| 3133 | |
| 3134 | if (opts.use_flexbuffers) { |
| 3135 | r = ParseFlexBuffer(source, source_filename, &flex_builder_); |
| 3136 | } else { |
| 3137 | r = !ParseRoot(source, include_paths, source_filename).Check(); |
| 3138 | } |
| 3139 | FLATBUFFERS_ASSERT(initial_depth == parse_depth_counter_); |
| 3140 | return r; |
| 3141 | } |
| 3142 | |
| 3143 | bool Parser::ParseJson(const char *json, const char *json_filename) { |
| 3144 | const auto initial_depth = parse_depth_counter_; |
no test coverage detected