diff --git a/src/headers/parsing/ParseComponents.hpp b/src/headers/parsing/ParseComponents.hpp index 9095fbe..5260188 100644 --- a/src/headers/parsing/ParseComponents.hpp +++ b/src/headers/parsing/ParseComponents.hpp @@ -74,6 +74,11 @@ public: inline constant_iterator cend() const noexcept { return subComponents.cend(); } const decltype(parent)& getParent() const { return parent; } + void traverse_parent(const auto& lambda) const + { if (parent.has_value()) for_each(parent.value().get().begin(), parent.value().get().end(), lambda); } + bool any_parent(const auto& lambda) const + { return parent.has_value() and any_of(parent.value().get().begin(), parent.value().get().end(), lambda); } + IS_PARSECOMPONENT vector findById() const {