diff options
author | John Hodge <tpg@mutabah.net> | 2018-10-06 07:29:46 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-10-06 07:29:46 +0800 |
commit | 26d664141d451aff8eac5ee967008df04e614ff2 (patch) | |
tree | f17c8d037c1eb91575f515ccf91fb5d1eaeed05d /src/hir/item_path.hpp | |
parent | 01b1a1382080aa1d9fc648d305a4a49a44781214 (diff) | |
download | mrust-26d664141d451aff8eac5ee967008df04e614ff2.tar.gz |
Const Evaluate - Very rough defer
Diffstat (limited to 'src/hir/item_path.hpp')
-rw-r--r-- | src/hir/item_path.hpp | 5 |
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()); } |