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/print | |
| 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/print')
| -rw-r--r-- | src/comp/syntax/print/pprust.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index 74ebd271b6a..59ea8216c43 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -726,8 +726,11 @@ fn print_mac(s: ps, m: ast::mac) { ast::mac_invoc(path, arg, body) { word(s.s, "#"); print_path(s, path, false); - alt arg.node { ast::expr_vec(_, _) { } _ { word(s.s, " "); } } - print_expr(s, arg); + alt arg { + some(@{node: ast::expr_vec(_, _), _}) { } + _ { word(s.s, " "); } + } + option::may(arg, bind print_expr(s, _)); // FIXME: extension 'body' } ast::mac_embed_type(ty) { |
