diff options
author | John Hodge <tpg@mutabah.net> | 2016-03-30 13:19:02 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-03-30 13:19:02 +0800 |
commit | 8f77e93357eeb45a31b14af91cd749a379da5179 (patch) | |
tree | 892e7362210557ef97cf3928fe84e75c32b76311 /src/ast/path.hpp | |
parent | 210b1a17340e3ed3a8da9c29588f5a0db0d5e435 (diff) | |
download | mrust-8f77e93357eeb45a31b14af91cd749a379da5179.tar.gz |
Resolve - Working on new `use` resolution code
Diffstat (limited to 'src/ast/path.hpp')
-rw-r--r-- | src/ast/path.hpp | 12 |
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 |