Allow macro_rules! macros to expand to expressions or items.

This commit is contained in:
Paul Stansifer
2012-11-07 23:13:15 -05:00
committed by Graydon Hoare
parent c946c87b6f
commit 9845a4be5a
3 changed files with 12 additions and 5 deletions

View File

@@ -44,6 +44,7 @@ type syntax_expander_tt_item_
enum mac_result {
mr_expr(@ast::expr),
mr_item(@ast::item),
mr_expr_or_item(fn@()-> @ast::expr, fn@()-> Option<@ast::item>),
mr_def(macro_def)
}