Skip to content

Commit 2e6c547

Browse files
committed
---
yaml --- r: 79257 b: refs/heads/auto c: 2c51e26 h: refs/heads/master i: 79255: a68db2f v: v3
1 parent 535fe7b commit 2e6c547

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
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: dfa04cecca1d7128cc4d8e3868f0b237f6266911
16+
refs/heads/auto: 2c51e262f367f0f079135a5a176706ea5ef78f78
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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)