diff options
author | John Hodge <tpg@mutabah.net> | 2016-08-19 11:47:47 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-08-19 11:47:47 +0800 |
commit | 5fc0bd9970a6d69051cfc7c483277fbdad73521a (patch) | |
tree | 953661ee380cedbf5ee1ec8a4adb1e42cc31f6ca /src/ast/crate.cpp | |
parent | eb6e05c941966dfc11a3d0377f67589023a32724 (diff) | |
download | mrust-5fc0bd9970a6d69051cfc7c483277fbdad73521a.tar.gz |
AST - Nicer TODO for `extern crate`
Diffstat (limited to 'src/ast/crate.cpp')
-rw-r--r-- | src/ast/crate.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ast/crate.cpp b/src/ast/crate.cpp index 369ef33d..31cfe4a7 100644 --- a/src/ast/crate.cpp +++ b/src/ast/crate.cpp @@ -36,10 +36,10 @@ void Crate::load_externs() auto cb = [this](Module& mod) { for( const auto& it : mod.items() ) { - if( it.data.is_Crate() ) { - const auto& name = it.data.as_Crate().name; - throw ::std::runtime_error( FMT("TODO: Load crate '" << name << "' as '" << it.name << "'") ); - } + TU_IFLET(AST::Item, it.data, Crate, c, + const auto& name = c.name; + TODO(it.data.span, "Load crate '" << name << "' as '" << it.name << "'"); + ) } }; iterate_module(m_root_module, cb); |