2011-08-08 16:17:33 -05:00
|
|
|
import base::*;
|
2012-03-12 22:04:27 -05:00
|
|
|
import io::writer_util;
|
2011-08-08 16:17:33 -05:00
|
|
|
|
2012-02-01 00:50:12 -06:00
|
|
|
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,
|
2012-01-31 21:30:26 -06:00
|
|
|
_body: ast::mac_body) -> @ast::expr {
|
2012-07-14 00:57:48 -05:00
|
|
|
let args = get_mac_args_no_max(cx,sp,arg,0u,~"log_syntax");
|
2011-08-08 16:17:33 -05:00
|
|
|
cx.print_backtrace();
|
2012-05-14 17:32:32 -05:00
|
|
|
io::stdout().write_line(
|
|
|
|
str::connect(vec::map(args,
|
2012-07-14 00:57:48 -05:00
|
|
|
|&&ex| print::pprust::expr_to_str(ex)), ~", ")
|
2012-05-14 17:32:32 -05:00
|
|
|
);
|
2011-08-08 16:17:33 -05:00
|
|
|
|
|
|
|
//trivial expression
|
2012-08-01 19:30:05 -05:00
|
|
|
return @{id: cx.next_id(), callee_id: cx.next_id(),
|
2012-07-11 16:31:35 -05:00
|
|
|
node: ast::expr_rec(~[], option::none), span: sp};
|
2011-08-12 09:15:18 -05:00
|
|
|
}
|