Allow for macros to occur in statement position.

This commit is contained in:
Paul Stansifer
2012-11-12 23:06:55 -05:00
committed by Graydon Hoare
parent fca52554e7
commit ee076f63f9
13 changed files with 33 additions and 17 deletions

View File

@@ -882,6 +882,10 @@ fn print_stmt(s: ps, st: ast::stmt) {
print_expr(s, expr);
word(s.s, ~";");
}
ast::stmt_mac(mac) => {
space_if_not_bol(s);
print_mac(s, mac);
}
}
if parse::classify::stmt_ends_with_semi(st) { word(s.s, ~";"); }
maybe_print_trailing_comment(s, st.span, None);