Skip to content

Commit 55d84d6

Browse files
committed
---
yaml --- r: 11016 b: refs/heads/master c: c0f9073 h: refs/heads/master v: v3
1 parent 9f8428a commit 55d84d6

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 67e961c17f4f30a73d1730ce6eed3cb1d34b5125
2+
refs/heads/master: c0f9073557b5daed86aea411fb4c56e554583af2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/comp/syntax/ext/expand.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ fn expand_expr(exts: hashmap<str, syntax_extension>, cx: ext_ctxt,
4646
}
4747
}
4848
}
49-
mac_qq(sp, exp) { (expand_qquote(cx, sp, exp), s) }
49+
mac_qq(sp, exp) {
50+
let r = expand_qquote(cx, sp, exp);
51+
// need to keep going, resuls may contain embedded qquote or
52+
// macro that need expanding
53+
let r2 = fld.fold_expr(r);
54+
(r2.node, s)
55+
}
5056
_ { cx.span_bug(mac.span, "naked syntactic bit") }
5157
}
5258
}

trunk/src/comp/syntax/ext/qquote.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn visit_expr_aq(expr: @ast::expr, &&cx: aq_ctxt, v: vt<aq_ctxt>)
3838
}
3939
}
4040

41-
fn expand_qquote(ecx: ext_ctxt, sp: span, e: @ast::expr) -> ast::expr_ {
41+
fn expand_qquote(ecx: ext_ctxt, sp: span, e: @ast::expr) -> @ast::expr {
4242
let str = codemap::span_to_snippet(sp, ecx.session().parse_sess.cm);
4343
let qcx = gather_anti_quotes(sp.lo, e);
4444
let cx = qcx;
@@ -89,7 +89,7 @@ fn expand_qquote(ecx: ext_ctxt, sp: span, e: @ast::expr) -> ast::expr_ {
8989
mk_vec_e(cx,sp, vec::map(qcx.gather, {|g| g.e}))]);
9090
}
9191

92-
ret rcall.node;
92+
ret rcall;
9393
}
9494

9595
fn replace(e: @ast::expr, repls: [@ast::expr]) -> @ast::expr {

0 commit comments

Comments
 (0)