diff options
author | John Hodge <tpg@mutabah.net> | 2016-09-01 12:05:18 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-09-01 12:05:18 +0800 |
commit | 0e84f7ae6f77001ddbb211f89e1f438b7fe96d6c (patch) | |
tree | 2e6364a03bf47ca41fb2b1ee153705535d9db7a2 /src/ast | |
parent | def3719f94f1bed17b6018975b9919c46ca43f16 (diff) | |
download | mrust-0e84f7ae6f77001ddbb211f89e1f438b7fe96d6c.tar.gz |
Resolve - HIR pointers for enum variants
Diffstat (limited to 'src/ast')
-rw-r--r-- | src/ast/path.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ast/path.hpp b/src/ast/path.hpp index f8a852c6..edc874bb 100644 --- a/src/ast/path.hpp +++ b/src/ast/path.hpp @@ -19,6 +19,9 @@ class TypeRef; namespace HIR { class Module; class Trait; +class Enum; +class Struct; +class Static; } // namespace HIR namespace AST { @@ -46,9 +49,11 @@ TAGGED_UNION_EX(PathBinding, (), Unbound, ( }), (Enum, struct { const Enum* enum_; + const ::HIR::Enum* hir = nullptr; }), (Struct, struct { const Struct* struct_; + const ::HIR::Struct* hir = nullptr; }), (Trait, struct { const Trait* trait_; @@ -56,6 +61,7 @@ TAGGED_UNION_EX(PathBinding, (), Unbound, ( }), (Static, struct { const Static* static_; + const ::HIR::Static* hir = nullptr; // if nullptr and static_ == nullptr, points to a `const` }), (Function, struct { const Function* func_; @@ -63,6 +69,7 @@ TAGGED_UNION_EX(PathBinding, (), Unbound, ( (EnumVar, struct { const Enum* enum_; unsigned int idx; + const ::HIR::Enum* hir = nullptr; }), (TypeAlias, struct { const TypeAlias* alias_; |