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