diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-07-08 20:52:54 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-07-09 12:35:30 -0700 |
| commit | 5543404abe2ecfe280ffd4393d4e4c9ad3d489b8 (patch) | |
| tree | 6413f156d3d7744c20d644f457a4715eb877edf3 /src/comp/syntax | |
| parent | 9af59f9d81b8d8c91e2c470e82813d75a6bcdc9e (diff) | |
| download | rust-5543404abe2ecfe280ffd4393d4e4c9ad3d489b8.tar.gz rust-5543404abe2ecfe280ffd4393d4e4c9ad3d489b8.zip | |
Track the path as we fold over the AST looking for unit tests. Issue #428
Diffstat (limited to 'src/comp/syntax')
| -rw-r--r-- | src/comp/syntax/ast.rs | 4 | ||||
| -rw-r--r-- | src/comp/syntax/fold.rs | 1 |
2 files changed, 4 insertions, 1 deletions
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; |
