summary refs log tree commit diff
path: root/src/comp/syntax/ext/simplext.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/syntax/ext/simplext.rs')
-rw-r--r--src/comp/syntax/ext/simplext.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/comp/syntax/ext/simplext.rs b/src/comp/syntax/ext/simplext.rs
index b8722122b69..d8496203e3d 100644
--- a/src/comp/syntax/ext/simplext.rs
+++ b/src/comp/syntax/ext/simplext.rs
@@ -671,6 +671,7 @@ fn p_t_s_r_actual_vector(cx: ext_ctxt, elts: [@expr], _repeat_after: bool,
 
 fn add_new_extension(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
                      _body: ast::mac_body) -> base::macro_def {
+    let arg = get_mac_arg(cx,sp,arg);
     let args: [@ast::expr] =
         alt arg.node {
           ast::expr_vec(elts, _) { elts }
@@ -716,7 +717,7 @@ fn add_new_extension(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
                     }
                     clauses +=
                         [@{params: pattern_to_selectors
-                               (cx, invoc_arg),
+                               (cx, get_mac_arg(cx,mac.span,invoc_arg)),
                            body: elts[1u]}];
 
                     // FIXME: check duplicates (or just simplify
@@ -757,6 +758,7 @@ fn add_new_extension(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
 
     fn generic_extension(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
                          _body: ast::mac_body, clauses: [@clause]) -> @expr {
+        let arg = get_mac_arg(cx,sp,arg);
         for c: @clause in clauses {
             alt use_selectors_to_bind(c.params, arg) {
               some(bindings) { ret transcribe(cx, bindings, c.body); }