From 1ac071bb74b47a0904e080f1343b31142da9da90 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Fri, 6 May 2016 15:12:00 +0800 Subject: Resolve - Separate modules and types for slightly different lookup requirements --- src/ast/ast.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/ast') 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 > m_type_items; - ::std::unordered_map< ::std::string, ::std::pair > 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() {} -- cgit v1.2.3