From 5543404abe2ecfe280ffd4393d4e4c9ad3d489b8 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 8 Jul 2011 20:52:54 -0700 Subject: Track the path as we fold over the AST looking for unit tests. Issue #428 --- src/comp/syntax/ast.rs | 4 +++- src/comp/syntax/fold.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/comp/syntax') diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs index 5438a2392b2..15cb5fc7d07 100644 --- a/src/comp/syntax/ast.rs +++ b/src/comp/syntax/ast.rs @@ -20,7 +20,9 @@ type path_ = rec(ident[] idents, (@ty)[] types); type path = spanned[path_]; -fn path_name(&path p) -> str { ret str::connect_ivec(p.node.idents, "::"); } +fn path_name(&path p) -> str { path_name_i(p.node.idents) } + +fn path_name_i(&ident[] idents) -> str { str::connect_ivec(idents, "::") } type crate_num = int; type node_id = int; diff --git a/src/comp/syntax/fold.rs b/src/comp/syntax/fold.rs index 01e43d9a369..4c35dd82170 100644 --- a/src/comp/syntax/fold.rs +++ b/src/comp/syntax/fold.rs @@ -12,6 +12,7 @@ export default_ast_fold; export make_fold; export dummy_out; export noop_fold_crate; +export noop_fold_item; type ast_fold = @mutable a_f; -- cgit 1.4.1-3-g733a5