1616
1717namespace simdjson {
1818
19+ /* * @private **/
1920class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")]] dom::parser::Iterator {
2021public:
2122 inline Iterator (const dom::parser &parser) noexcept (false );
@@ -104,11 +105,11 @@ class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")
104105
105106 inline bool is_string () const { return get_type () == ' "' ; }
106107
107- // Returns true if the current type of node is an signed integer.
108+ // Returns true if the current type of the node is an signed integer.
108109 // You can get its value with `get_integer()`.
109110 inline bool is_integer () const { return get_type () == ' l' ; }
110111
111- // Returns true if the current type of node is an unsigned integer.
112+ // Returns true if the current type of the node is an unsigned integer.
112113 // You can get its value with `get_unsigned_integer()`.
113114 //
114115 // NOTE:
@@ -117,19 +118,19 @@ class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")
117118 // positive integer, such as 1, 42, or 1000000, is as a signed node.
118119 // Be aware this function returns false for a signed node.
119120 inline bool is_unsigned_integer () const { return get_type () == ' u' ; }
120-
121+ // Returns true if the current type of the node is a double floating-point number.
121122 inline bool is_double () const { return get_type () == ' d' ; }
122-
123+ // Returns true if the current type of the node is a number (integer or floating-point).
123124 inline bool is_number () const {
124125 return is_integer () || is_unsigned_integer () || is_double ();
125126 }
126-
127+ // Returns true if the current type of the node is a bool with true value.
127128 inline bool is_true () const { return get_type () == ' t' ; }
128-
129+ // Returns true if the current type of the node is a bool with false value.
129130 inline bool is_false () const { return get_type () == ' f' ; }
130-
131+ // Returns true if the current type of the node is null.
131132 inline bool is_null () const { return get_type () == ' n' ; }
132-
133+ // Returns true if the type byte represents an object of an array
133134 static bool is_object_or_array (uint8_t type) {
134135 return ((type == ' [' ) || (type == ' {' ));
135136 }
@@ -243,15 +244,10 @@ class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")
243244 ;
244245 }
245246
246- // void to_end_scope(); // move us to
247- // the start of our current scope; always succeeds
247+
248248
249249 // print the node we are currently pointing at
250250 inline bool print (std::ostream &os, bool escape_strings = true ) const ;
251- typedef struct {
252- size_t start_of_scope;
253- uint8_t scope_type;
254- } scopeindex_t ;
255251
256252 private:
257253 const document &doc;
@@ -261,6 +257,11 @@ class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")
261257 size_t tape_length{};
262258 uint8_t current_type{};
263259 uint64_t current_val{};
260+ typedef struct {
261+ size_t start_of_scope;
262+ uint8_t scope_type;
263+ } scopeindex_t ;
264+
264265 scopeindex_t *depth_index{};
265266};
266267
0 commit comments