about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-07-03 17:30:25 -0700
committerBrian Anderson <banderson@mozilla.com>2012-07-03 17:30:25 -0700
commitae6ea068a12877742247b848ceeaa39c41e981c6 (patch)
tree8c146d3fa5668113d192a9ef203e88107c637f23 /src/libsyntax/parse
parente000d1db0ab047b8d2949de4ab221718905ce3b1 (diff)
downloadrust-ae6ea068a12877742247b848ceeaa39c41e981c6.tar.gz
rust-ae6ea068a12877742247b848ceeaa39c41e981c6.zip
Revert "Remove rule requiring non-nil block-style statements to be semi-terminated"
This reverts commit 0f5eaef5fb2443acd3ea67250c953839c3d04d38.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/classify.rs3
-rw-r--r--src/libsyntax/parse/parser.rs2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs
index 4fcb761fa06..9b36b77407e 100644
--- a/src/libsyntax/parse/classify.rs
+++ b/src/libsyntax/parse/classify.rs
@@ -27,6 +27,9 @@ fn stmt_ends_with_semi(stmt: ast::stmt) -> bool {
       ast::stmt_expr(e, _) {
         ret expr_requires_semi_to_be_stmt(e);
       }
+      ast::stmt_semi(e, _) {
+        ret false;
+      }
     }
 }
 
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 97185b6dfb9..747ca07bee5 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1848,7 +1848,7 @@ class parser {
                       token::SEMI {
                         self.bump();
                         push(stmts,
-                             @{node: stmt_expr(e, stmt_id) with *stmt});
+                             @{node: stmt_semi(e, stmt_id) with *stmt});
                       }
                       token::RBRACE {
                         expr = some(e);