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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user