diff options
| author | Brian Anderson <[email protected]> | 2011-03-07 21:52:08 -0500 |
|---|---|---|
| committer | Brian Anderson <[email protected]> | 2011-03-07 22:06:26 -0500 |
| commit | 5aabe7e84fd329133909ee4ec66c88df74e06f78 (patch) | |
| tree | 5140e0d544363ba2337354e6bf088982c1479261 /src/comp/pretty | |
| parent | Remove old pretty-printer from rustc (diff) | |
| download | rust-5aabe7e84fd329133909ee4ec66c88df74e06f78.tar.xz rust-5aabe7e84fd329133909ee4ec66c88df74e06f78.zip | |
Add partial pretty-printing for syntax extensions
Diffstat (limited to 'src/comp/pretty')
| -rw-r--r-- | src/comp/pretty/pprust.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs index aecbf57a..c54786fd 100644 --- a/src/comp/pretty/pprust.rs +++ b/src/comp/pretty/pprust.rs @@ -512,8 +512,17 @@ impure fn print_expr(ps s, @ast.expr expr) { wrd1(s, "check"); print_expr(s, expr); } + case (ast.expr_ext(?path, ?args, ?body, _, _)) { + wrd(s, "#"); + print_path(s, path); + if (_vec.len[@ast.expr](args) > 0u) { + popen(s); + commasep[@ast.expr](s, args, pe); + pclose(s); + } + // TODO: extension 'body' + } case (_) {wrd(s, "X");} - // TODO expr_ext(path, vec[@expr], option.t[@expr], @expr, ann); } end(s); } |