about summary refs log tree commit diff
path: root/src/libsyntax/ext/tt
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-08-06 17:14:32 -0700
committerBrian Anderson <banderson@mozilla.com>2012-08-07 12:23:43 -0700
commit2772b2e5c7f85e230bcae13c49eb1386afc6cd0e (patch)
tree6161076f339dc2adeffcfbc8bcb6e86882b7b16d /src/libsyntax/ext/tt
parentabf4421e7c2fce4e768eb20c126989501081f4f9 (diff)
downloadrust-2772b2e5c7f85e230bcae13c49eb1386afc6cd0e.tar.gz
rust-2772b2e5c7f85e230bcae13c49eb1386afc6cd0e.zip
syntax: Make match arm parsing more restrictive again
Require comma separators for all expression types except the plain block
Diffstat (limited to 'src/libsyntax/ext/tt')
-rw-r--r--src/libsyntax/ext/tt/earley_parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/ext/tt/earley_parser.rs b/src/libsyntax/ext/tt/earley_parser.rs
index f1c7ebb7dad..d84eb3ec488 100644
--- a/src/libsyntax/ext/tt/earley_parser.rs
+++ b/src/libsyntax/ext/tt/earley_parser.rs
@@ -322,7 +322,7 @@ fn parse_nt(p: parser, name: ~str) -> nonterminal {
       ~"item" => match p.parse_item(~[]) {
         some(i) => token::nt_item(i),
         none => p.fatal(~"expected an item keyword")
-      }
+      },
       ~"block" => token::nt_block(p.parse_block()),
       ~"stmt" => token::nt_stmt(p.parse_stmt(~[])),
       ~"pat" => token::nt_pat(p.parse_pat(true)),
@@ -333,7 +333,7 @@ fn parse_nt(p: parser, name: ~str) -> nonterminal {
         token::IDENT(sn,b) => { p.bump(); token::nt_ident(sn,b) }
         _ => p.fatal(~"expected ident, found "
                      + token::to_str(*p.reader.interner(), copy p.token))
-      }
+      },
       ~"path" => token::nt_path(p.parse_path_with_tps(false)),
       ~"tt" => {
         p.quote_depth += 1u; //but in theory, non-quoted tts might be useful