about summary refs log tree commit diff
path: root/src/comp/syntax/visit.rs
diff options
context:
space:
mode:
authorKevin Atkinson <kevina@cs.utah.edu>2012-02-01 00:20:31 -0700
committerKevin Atkinson <kevina@cs.utah.edu>2012-02-03 20:41:48 -0700
commitda74a7f9ca774cd8addcb00a361bb230facc3b31 (patch)
tree56a6c60c5d6825a02e59c8934deba409334f70e0 /src/comp/syntax/visit.rs
parent5ea04c65c151708272b92d00c8448156239affb2 (diff)
downloadrust-da74a7f9ca774cd8addcb00a361bb230facc3b31.tar.gz
rust-da74a7f9ca774cd8addcb00a361bb230facc3b31.zip
Make macro arg optional in syntax, again untested.
Diffstat (limited to 'src/comp/syntax/visit.rs')
-rw-r--r--src/comp/syntax/visit.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/comp/syntax/visit.rs b/src/comp/syntax/visit.rs
index 0601e8285d4..50a4f2cfbfa 100644
--- a/src/comp/syntax/visit.rs
+++ b/src/comp/syntax/visit.rs
@@ -273,7 +273,8 @@ fn visit_exprs<E>(exprs: [@expr], e: E, v: vt<E>) {
 
 fn visit_mac<E>(m: mac, e: E, v: vt<E>) {
     alt m.node {
-      ast::mac_invoc(pth, arg, body) { visit_expr(arg, e, v); }
+      ast::mac_invoc(pth, arg, body) {
+        option::map(arg) {|arg| visit_expr(arg, e, v)}; }
       ast::mac_embed_type(ty) { v.visit_ty(ty, e, v); }
       ast::mac_embed_block(blk) { v.visit_block(blk, e, v); }
       ast::mac_ellipsis { }