Enable item macros to define macros.

This commit is contained in:
Paul Stansifer
2012-07-06 14:29:50 -07:00
parent 579768baa5
commit cabee6391d
3 changed files with 17 additions and 6 deletions

View File

@@ -20,7 +20,12 @@ type syntax_expander_tt_ = fn@(ext_ctxt, span, ast::token_tree) -> @ast::expr;
type syntax_expander_tt_item
= {expander: syntax_expander_tt_item_, span: option<span>};
type syntax_expander_tt_item_
= fn@(ext_ctxt, span, ast::ident, ast::token_tree) -> @ast::item;
= fn@(ext_ctxt, span, ast::ident, ast::token_tree) -> mac_result;
enum mac_result {
mr_item(@ast::item),
mr_def(macro_def)
}
enum syntax_extension {
normal(syntax_expander),