summaryrefslogtreecommitdiff
path: root/src/ast/path.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-03-30 13:19:02 +0800
committerJohn Hodge <tpg@mutabah.net>2016-03-30 13:19:02 +0800
commit8f77e93357eeb45a31b14af91cd749a379da5179 (patch)
tree892e7362210557ef97cf3928fe84e75c32b76311 /src/ast/path.hpp
parent210b1a17340e3ed3a8da9c29588f5a0db0d5e435 (diff)
downloadmrust-8f77e93357eeb45a31b14af91cd749a379da5179.tar.gz
Resolve - Working on new `use` resolution code
Diffstat (limited to 'src/ast/path.hpp')
-rw-r--r--src/ast/path.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ast/path.hpp b/src/ast/path.hpp
index d2f6302e..bf0ff59a 100644
--- a/src/ast/path.hpp
+++ b/src/ast/path.hpp
@@ -28,7 +28,7 @@ class Trait;
class Static;
class Function;
-TAGGED_UNION(PathBinding, Unbound,
+TAGGED_UNION_EX(PathBinding, (), Unbound, (
(Unbound, struct {
}),
(Module, struct {
@@ -72,6 +72,12 @@ TAGGED_UNION(PathBinding, Unbound,
(Variable, struct {
unsigned int slot;
})
+ ),
+ (), (),
+ (
+ public:
+ PathBinding clone() const;
+ )
);
extern ::std::ostream& operator<<(::std::ostream& os, const PathBinding& x);
@@ -343,6 +349,10 @@ public:
void bind_type_alias(const TypeAlias& ent, const ::std::vector<TypeRef>& args={}) {
m_binding = PathBinding::make_TypeAlias({&ent});
}
+
+ void bind(::AST::PathBinding pb) {
+ m_binding = mv$(pb);
+ }
};
} // namespace AST