summaryrefslogtreecommitdiff
path: root/src/hir/item_path.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hir/item_path.hpp')
-rw-r--r--src/hir/item_path.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hir/item_path.hpp b/src/hir/item_path.hpp
index d19435eb..d93df9e8 100644
--- a/src/hir/item_path.hpp
+++ b/src/hir/item_path.hpp
@@ -87,6 +87,11 @@ public:
return name ? name : "";
}
+ const ItemPath& get_top_ip() const {
+ if( this->parent )
+ return this->parent->get_top_ip();
+ return *this;
+ }
ItemPath operator+(const ::std::string& name) const {
return ItemPath(*this, name.c_str());
}