summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/index.cpp7
-rw-r--r--src/resolve/use.cpp8
2 files changed, 15 insertions, 0 deletions
diff --git a/src/resolve/index.cpp b/src/resolve/index.cpp
index 45fb58f5..bde59da8 100644
--- a/src/resolve/index.cpp
+++ b/src/resolve/index.cpp
@@ -456,6 +456,13 @@ void Resolve_Index_Module_Wildcard__use_stmt(AST::Crate& crate, AST::Module& dst
DEBUG("Glob crate " << i_data.path);
const auto& hmod = e.crate_->m_hir->m_root_module;
Resolve_Index_Module_Wildcard__glob_in_hir_mod(sp, crate, dst_mod, hmod, i_data.path, is_pub);
+ // TODO: Macros too
+ for(const auto& pm : e.crate_->m_hir->m_proc_macros)
+ {
+ dst_mod.m_macro_imports.push_back({
+ is_pub, pm.name, make_vec2(e.crate_->m_hir->m_crate_name, pm.name), nullptr
+ });
+ }
)
else TU_IFLET(::AST::PathBinding_Type, b, Module, e,
DEBUG("Glob mod " << i_data.path);
diff --git a/src/resolve/use.cpp b/src/resolve/use.cpp
index d1b96280..8a9a3167 100644
--- a/src/resolve/use.cpp
+++ b/src/resolve/use.cpp
@@ -751,6 +751,14 @@ namespace {
{
rv.macro = ::AST::PathBinding_Macro::make_MacroRules({ &ec, &*it->second });
}
+
+ {
+ auto it = ::std::find_if( ec.m_hir->m_proc_macros.begin(), ec.m_hir->m_proc_macros.end(), [&](const auto& pm){ return pm.name == name;} );
+ if( it != ec.m_hir->m_proc_macros.end() )
+ {
+ rv.macro = ::AST::PathBinding_Macro::make_ProcMacro({ &ec, name });
+ }
+ }
}
return rv;
}