| 164 | } |
| 165 | |
| 166 | sonic_force_inline bool Key(StringView s) { |
| 167 | if (parent_node_ && parent_node_->IsObject()) { |
| 168 | if (found_node_count_ >= parent_node_->Size()) { |
| 169 | cur_node_ = nullptr; |
| 170 | return false; |
| 171 | } |
| 172 | auto m = parent_node_->FindMember(s); |
| 173 | if (m != parent_node_->MemberEnd()) { |
| 174 | cur_node_ = &(m->value); |
| 175 | found_node_count_++; |
| 176 | return true; |
| 177 | } else { |
| 178 | cur_node_ = nullptr; |
| 179 | return false; |
| 180 | } |
| 181 | } |
| 182 | // parent node ptr doesn't exist, we need save value into a new object. |
| 183 | // cur_node_ need to be set as nullptr! |
| 184 | cur_node_ = nullptr; |
| 185 | return stringImpl(s); |
| 186 | } |
| 187 | |
| 188 | sonic_force_inline bool String(StringView s) { |
| 189 | if (cur_node_) { |
nothing calls this directly
no test coverage detected