summaryrefslogtreecommitdiff
path: root/src/ast/path.hpp
diff options
context:
space:
mode:
authorJohn Hodge (sonata) <tpg@mutabah.net>2015-01-04 09:42:53 +0800
committerJohn Hodge (sonata) <tpg@mutabah.net>2015-01-04 09:42:53 +0800
commit4a9e7dc0e4976c03a8dbceeacc5e474509b237f9 (patch)
tree5696f6f2fe862fe0a548444a188dd1fdbd831341 /src/ast/path.hpp
parent5fae00d74e717a703d1bbc90536a003a205eae95 (diff)
downloadmrust-4a9e7dc0e4976c03a8dbceeacc5e474509b237f9.tar.gz
Hacking up 'use' resolution (needs work to handle recursion)
Diffstat (limited to 'src/ast/path.hpp')
-rw-r--r--src/ast/path.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ast/path.hpp b/src/ast/path.hpp
index 9887d192..182802f2 100644
--- a/src/ast/path.hpp
+++ b/src/ast/path.hpp
@@ -73,6 +73,11 @@ public:
ret.m_nodes.push_back(ent);
return ret;
}
+ Path operator+(const ::std::string& s) const {
+ Path tmp;
+ tmp.append(PathNode(s, {}));
+ return Path(*this) += tmp;
+ }
Path operator+(const Path& x) const {
return Path(*this) += x;
}