Skip to content

Commit 050b8ba

Browse files
committed
---
yaml --- r: 79485 b: refs/heads/snap-stage3 c: 2c51e26 h: refs/heads/master i: 79483: 03a1d5d v: v3
1 parent fb80018 commit 050b8ba

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 124eb2119c78651cfaaa7a046a101fa2e20f83ca
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: dfa04cecca1d7128cc4d8e3868f0b237f6266911
4+
refs/heads/snap-stage3: 2c51e262f367f0f079135a5a176706ea5ef78f78
55
refs/heads/try: ac820906c0e53eab79a98ee64f7231f57c3887b4
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/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)