1
Fork 0

m1!{...} -> m1!(...)

This commit is contained in:
Paul Stansifer 2012-08-22 17:24:52 -07:00
parent 226fd87199
commit 29f32b4a72
380 changed files with 5330 additions and 2706 deletions

View file

@ -31,12 +31,12 @@ fn expand_expr(exts: hashmap<~str, syntax_extension>, cx: ext_ctxt,
match exts.find(*extname) {
none => {
cx.span_fatal(pth.span,
fmt!{"macro undefined: '%s'", *extname})
fmt!("macro undefined: '%s'", *extname))
}
some(item_decorator(_)) => {
cx.span_fatal(
pth.span,
fmt!{"%s can only be used as a decorator", *extname});
fmt!("%s can only be used as a decorator", *extname));
}
some(normal({expander: exp, span: exp_sp})) => {
let expanded = exp(cx, mac.span, args, body);
@ -56,8 +56,8 @@ fn expand_expr(exts: hashmap<~str, syntax_extension>, cx: ext_ctxt,
}
some(expr_tt(_)) => {
cx.span_fatal(pth.span,
fmt!{"this tt-style macro should be \
invoked '%s!{...}'", *extname})
fmt!("this tt-style macro should be \
invoked '%s!(...)'", *extname))
}
some(item_tt(*)) => {
cx.span_fatal(pth.span,
@ -76,14 +76,14 @@ fn expand_expr(exts: hashmap<~str, syntax_extension>, cx: ext_ctxt,
match exts.find(*extname) {
none => {
cx.span_fatal(pth.span,
fmt!{"macro undefined: '%s'", *extname})
fmt!("macro undefined: '%s'", *extname))
}
some(expr_tt({expander: exp, span: exp_sp})) => {
let expanded = match exp(cx, mac.span, tts) {
mr_expr(e) => e,
_ => cx.span_fatal(
pth.span, fmt!{"non-expr macro in expr pos: %s",
*extname})
pth.span, fmt!("non-expr macro in expr pos: %s",
*extname))
};
cx.bt_push(expanded_from({call_site: s,
@ -110,8 +110,8 @@ fn expand_expr(exts: hashmap<~str, syntax_extension>, cx: ext_ctxt,
}
_ => {
cx.span_fatal(pth.span,
fmt!{"'%s' is not a tt-style macro",
*extname})
fmt!("'%s' is not a tt-style macro",
*extname))
}
}
@ -202,7 +202,7 @@ fn expand_item_mac(exts: hashmap<~str, syntax_extension>,
match exts.find(*extname) {
none => {
cx.span_fatal(pth.span,
fmt!{"macro undefined: '%s'", *extname})
fmt!("macro undefined: '%s'", *extname))
}
some(item_tt(expand)) => {
let expanded = expand.expander(cx, it.span, it.ident, tts);
@ -223,7 +223,7 @@ fn expand_item_mac(exts: hashmap<~str, syntax_extension>,
return maybe_it
}
_ => cx.span_fatal(it.span,
fmt!{"%s is not a legal here", *extname})
fmt!("%s is not a legal here", *extname))
}
}
_ => cx.span_bug(it.span, ~"invalid item macro invocation")