File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,6 @@ struct structural_parser : structural_iterator {
34
34
return SUCCESS;
35
35
}
36
36
template <typename T>
37
- WARN_UNUSED really_inline error_code start_object (T &builder) {
38
- depth++;
39
- if (depth >= dom_parser.max_depth ()) { log_error (" Exceeded max depth!" ); return DEPTH_ERROR; }
40
- builder.start_object (*this );
41
- dom_parser.is_array [depth] = false ;
42
- return SUCCESS;
43
- }
44
- template <typename T>
45
37
WARN_UNUSED really_inline error_code start_array (T &builder) {
46
38
depth++;
47
39
if (depth >= dom_parser.max_depth ()) { log_error (" Exceeded max depth!" ); return DEPTH_ERROR; }
@@ -149,7 +141,11 @@ WARN_UNUSED really_inline error_code structural_parser::parse(T &builder) noexce
149
141
// Object parser states
150
142
//
151
143
object_begin: {
152
- SIMDJSON_TRY ( start_object (builder) );
144
+ depth++;
145
+ if (depth >= dom_parser.max_depth ()) { log_error (" Exceeded max depth!" ); return DEPTH_ERROR; }
146
+ builder.start_object (*this );
147
+ dom_parser.is_array [depth] = false ;
148
+
153
149
const uint8_t *key = advance ();
154
150
if (*key != ' "' ) {
155
151
log_error (" Object does not start with a key" );
@@ -207,7 +203,11 @@ scope_end: {
207
203
// Array parser states
208
204
//
209
205
array_begin: {
210
- SIMDJSON_TRY ( start_array (builder) );
206
+ depth++;
207
+ if (depth >= dom_parser.max_depth ()) { log_error (" Exceeded max depth!" ); return DEPTH_ERROR; }
208
+ builder.start_array (*this );
209
+ dom_parser.is_array [depth] = true ;
210
+
211
211
builder.increment_count (*this );
212
212
} // array_begin:
213
213
You can’t perform that action at this time.
0 commit comments