diff options
| author | Kevin Atkinson <kevina@cs.utah.edu> | 2012-02-01 00:20:31 -0700 |
|---|---|---|
| committer | Kevin Atkinson <kevina@cs.utah.edu> | 2012-02-03 20:41:48 -0700 |
| commit | da74a7f9ca774cd8addcb00a361bb230facc3b31 (patch) | |
| tree | 56a6c60c5d6825a02e59c8934deba409334f70e0 /src/comp/syntax/fold.rs | |
| parent | 5ea04c65c151708272b92d00c8448156239affb2 (diff) | |
| download | rust-da74a7f9ca774cd8addcb00a361bb230facc3b31.tar.gz rust-da74a7f9ca774cd8addcb00a361bb230facc3b31.zip | |
Make macro arg optional in syntax, again untested.
Diffstat (limited to 'src/comp/syntax/fold.rs')
| -rw-r--r-- | src/comp/syntax/fold.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/comp/syntax/fold.rs b/src/comp/syntax/fold.rs index 1831e30e810..e3a05961bea 100644 --- a/src/comp/syntax/fold.rs +++ b/src/comp/syntax/fold.rs @@ -133,7 +133,10 @@ fn fold_mac_(m: mac, fld: ast_fold) -> mac { ret {node: alt m.node { mac_invoc(pth, arg, body) { - mac_invoc(fld.fold_path(pth), fld.fold_expr(arg), body) + mac_invoc(fld.fold_path(pth), + // FIXME: bind should work, but causes a crash + option::map(arg) {|arg| fld.fold_expr(arg)}, + body) } mac_embed_type(ty) { mac_embed_type(fld.fold_ty(ty)) } mac_embed_block(blk) { mac_embed_block(fld.fold_block(blk)) } |
