diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-09-02 16:00:18 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-09-02 16:00:18 +0800 |
commit | c623c36a403a8e8469ba893387af2e9494607a06 (patch) | |
tree | cb867e32784194e5dbb09dd17944e216ca15e08c | |
parent | 8f96a8752fbeaabb6c091185d2098a65e4dd2511 (diff) | |
download | mrust-c623c36a403a8e8469ba893387af2e9494607a06.tar.gz |
Expand - Debugging a hygine issue
-rw-r--r-- | src/ast/path.cpp | 1 | ||||
-rw-r--r-- | src/expand/mod.cpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/ast/path.cpp b/src/ast/path.cpp index 37428b1a..ae4ff626 100644 --- a/src/ast/path.cpp +++ b/src/ast/path.cpp @@ -270,6 +270,7 @@ void Path::print_pretty(::std::ostream& os, bool is_type_context) const os << ent.name; ), (Relative, + os << ent.hygiene; for(const auto& n : ent.nodes) { if( &n != &ent.nodes[0] ) { diff --git a/src/expand/mod.cpp b/src/expand/mod.cpp index 7bcf0774..771e92ac 100644 --- a/src/expand/mod.cpp +++ b/src/expand/mod.cpp @@ -875,6 +875,7 @@ void Expand_BareExpr(const ::AST::Crate& crate, const AST::Module& mod, ::std::u void Expand_Impl(::AST::Crate& crate, LList<const AST::Module*> modstack, ::AST::Path modpath, ::AST::Module& mod, ::AST::Impl& impl) { + TRACE_FUNCTION_F(impl.def()); Expand_Attrs(impl.def().attrs(), AttrStage::Pre, crate, mod, impl.def()); if( impl.def().type().is_wildcard() ) { DEBUG("Deleted"); @@ -926,6 +927,7 @@ void Expand_Impl(::AST::Crate& crate, LList<const AST::Module*> modstack, ::AST: } ), (Function, + TRACE_FUNCTION_F("fn " << i.name); for(auto& arg : e.args()) { Expand_Pattern(crate, modstack, mod, arg.first, false); Expand_Type(crate, modstack, mod, arg.second); @@ -934,10 +936,12 @@ void Expand_Impl(::AST::Crate& crate, LList<const AST::Module*> modstack, ::AST: Expand_Expr(crate, modstack, e.code()); ), (Static, + TRACE_FUNCTION_F("static " << i.name); Expand_Expr(crate, modstack, e.value()); Expand_Type(crate, modstack, mod, e.type()); ), (Type, + TRACE_FUNCTION_F("type " << i.name); Expand_Type(crate, modstack, mod, e.type()); ) ) |