about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
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/parse/parser.rs
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/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 5b889b4ad96..c675af6803c 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -963,7 +963,7 @@ class parser {
                 hi = self.span.hi;
                 ex = expr_vstore(self.mk_expr(lo, hi, ex), vstore_fixed(v));
             }
-          }
+          },
           _ => ()
         }
 
@@ -1579,7 +1579,7 @@ class parser {
             let expr = self.parse_expr_res(RESTRICT_STMT_EXPR);
 
             let require_comma =
-                classify::expr_requires_semi_to_be_stmt(expr)
+                !classify::expr_is_simple_block(expr)
                 && self.token != token::RBRACE;
 
             if require_comma {
@@ -1839,7 +1839,7 @@ class parser {
                                             (token::COMMA),
                                         |p| p.parse_pat(refutable));
                                   }
-                              }
+                              },
                               _ => ()
                             }
                             // at this point, we're not sure whether it's a