| 81 | } |
| 82 | |
| 83 | bool DeepIterator::iterateContainer(const Value *container) { |
| 84 | _container = container; |
| 85 | _stack.push_front({{nullslice, 0}, nullptr}); // Push en end-of-level marker first |
| 86 | auto type = container->type(); |
| 87 | if (type == kArray) { |
| 88 | _arrayIt.reset( new Array::iterator(container->asArray()) ); |
| 89 | _arrayIndex = 0; |
| 90 | return true; |
| 91 | } else if (type == kDict) { |
| 92 | _dictIt.reset( new Dict::iterator(container->asDict(), _sk) ); |
| 93 | return true; |
| 94 | } else { |
| 95 | return false; |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | void DeepIterator::queueChildren() { |
| 100 | auto type = _value->type(); |