From cdedfd8738aa488f7b87fd65ac8ab160c0947b18 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 29 Dec 2018 16:55:27 +0800 Subject: Resolve/HIR - Rough handling of `pub use macro_path;` --- src/ast/ast.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/ast') diff --git a/src/ast/ast.hpp b/src/ast/ast.hpp index 2d802f53..b80b5fb7 100644 --- a/src/ast/ast.hpp +++ b/src/ast/ast.hpp @@ -537,7 +537,13 @@ public: // List of macros imported from other modules (via #[macro_use], includes proc macros) // - First value is an absolute path to the macro (including crate name) - ::std::vector<::std::pair< ::std::vector<::std::string>, const MacroRules* >> m_macro_imports; + struct MacroImport { + bool is_pub; + ::std::string name; // Can be different, if `use foo as bar` is used + ::std::vector<::std::string> path; // includes the crate name + const MacroRules* macro_ptr; + }; + ::std::vector m_macro_imports; public: Module() {} -- cgit v1.2.3