summaryrefslogtreecommitdiff
path: root/src/ast
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-05-06 15:12:00 +0800
committerJohn Hodge <tpg@mutabah.net>2016-05-06 15:12:00 +0800
commit1ac071bb74b47a0904e080f1343b31142da9da90 (patch)
tree0fc3b75aba1187b4c45c79153de2f3cf853a0ff1 /src/ast
parent3081e4762069a8ba401f77bee4951061b1e9589a (diff)
downloadmrust-1ac071bb74b47a0904e080f1343b31142da9da90.tar.gz
Resolve - Separate modules and types for slightly different lookup requirements
Diffstat (limited to 'src/ast')
-rw-r--r--src/ast/ast.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ast/ast.hpp b/src/ast/ast.hpp
index 4ca16210..fc1a2f73 100644
--- a/src/ast/ast.hpp
+++ b/src/ast/ast.hpp
@@ -552,8 +552,14 @@ private:
public:
char m_index_populated = 0; // 0 = no, 1 = partial, 2 = complete
- ::std::unordered_map< ::std::string, ::std::pair<bool, PathBinding> > m_type_items;
- ::std::unordered_map< ::std::string, ::std::pair<bool, PathBinding> > m_value_items;
+ // TODO: Add "namespace" list (separate to types)
+ struct IndexEnt {
+ bool is_pub;
+ ::AST::Path path;
+ };
+ ::std::unordered_map< ::std::string, IndexEnt > m_namespace_items;
+ ::std::unordered_map< ::std::string, IndexEnt > m_type_items;
+ ::std::unordered_map< ::std::string, IndexEnt > m_value_items;
public:
Module() {}