| 720 | |
| 721 | template <typename F> |
| 722 | td::Status process_array(bool is_required, F &&run) { |
| 723 | if (!back().exists()) { |
| 724 | if (is_required) { |
| 725 | return td::Status::Error(ton::ErrorCode::protoviolation, PSTRING() << path() << " must exist"); |
| 726 | } |
| 727 | return td::Status::OK(); |
| 728 | } |
| 729 | return back().iterate_array([&](std::unique_ptr<CtxLevel> obj) { |
| 730 | levels.push_back(std::move(obj)); |
| 731 | TRY_STATUS(run(*this)); |
| 732 | TRY_STATUS(check_unprocessed_fields()); |
| 733 | levels.pop_back(); |
| 734 | return td::Status::OK(); |
| 735 | }); |
| 736 | } |
| 737 | |
| 738 | bool is_string() { |
| 739 | return back().is_string(); |
no test coverage detected