Skip to content

Commit 9859cb7

Browse files
committed
---
yaml --- r: 79354 b: refs/heads/try c: 34015c3 h: refs/heads/master v: v3
1 parent 412159f commit 9859cb7

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e6de6b7da8ee88bf84b0e217900051334be08da
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
5-
refs/heads/try: 10baf2ca34f15ef91c97f6de22ff800c20d3a677
5+
refs/heads/try: 34015c36c7154ab34e04d32ec622934ede7d0393
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libsyntax/ext/expand.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,13 +1454,20 @@ pub fn fun_to_ctxt_folder<T : 'static + CtxtFn>(cf: @T) -> @AstFoldFns {
14541454
|ast::Ident{name, ctxt}, _| {
14551455
ast::Ident{name:name,ctxt:cf.f(ctxt)}
14561456
};
1457-
// we've also got to pick up macro invocations; they can
1458-
// appear as exprs, stmts, items, and types. urg, it's going
1459-
// to be easier just to add a fold_mac, I think.
1460-
//let fold_ex : @
1457+
let fm : @fn(&ast::mac_, span, @ast_fold) -> (ast::mac_,span) =
1458+
|m, sp, fld| {
1459+
match *m {
1460+
mac_invoc_tt(ref path, ref tts, ctxt) =>
1461+
(mac_invoc_tt(fld.fold_path(path),
1462+
fold_tts(*tts,fld),
1463+
cf.f(ctxt)),
1464+
sp)
1465+
}
1466+
1467+
};
14611468
@AstFoldFns{
14621469
fold_ident : fi,
1463-
// check that it works, then add the fold_expr clause....
1470+
fold_mac : fm,
14641471
.. *afp
14651472
}
14661473
}

0 commit comments

Comments
 (0)