Skip to content

Commit 5aabe7e

Browse files
committed
Add partial pretty-printing for syntax extensions
1 parent fa2525a commit 5aabe7e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/comp/pretty/pprust.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,17 @@ impure fn print_expr(ps s, @ast.expr expr) {
512512
wrd1(s, "check");
513513
print_expr(s, expr);
514514
}
515+
case (ast.expr_ext(?path, ?args, ?body, _, _)) {
516+
wrd(s, "#");
517+
print_path(s, path);
518+
if (_vec.len[@ast.expr](args) > 0u) {
519+
popen(s);
520+
commasep[@ast.expr](s, args, pe);
521+
pclose(s);
522+
}
523+
// TODO: extension 'body'
524+
}
515525
case (_) {wrd(s, "X");}
516-
// TODO expr_ext(path, vec[@expr], option.t[@expr], @expr, ann);
517526
}
518527
end(s);
519528
}

0 commit comments

Comments
 (0)