Change the type for the macro body to also store the span.

Note: the body is the part of the macro syntax between the {}.
This commit is contained in:
Kevin Atkinson
2012-01-31 20:30:26 -07:00
parent 099290bc73
commit e76fdeb3a6
8 changed files with 13 additions and 10 deletions

View File

@@ -6,10 +6,10 @@ import std::map::new_str_hash;
import codemap;
type syntax_expander =
fn@(ext_ctxt, span, @ast::expr, option<str>) -> @ast::expr;
fn@(ext_ctxt, span, @ast::expr, ast::mac_body) -> @ast::expr;
type macro_def = {ident: str, ext: syntax_extension};
type macro_definer =
fn@(ext_ctxt, span, @ast::expr, option<str>) -> macro_def;
fn@(ext_ctxt, span, @ast::expr, ast::mac_body) -> macro_def;
enum syntax_extension {
normal(syntax_expander),