about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorBrian Anderson <andersrb@gmail.com>2011-03-25 23:11:46 -0400
committerGraydon Hoare <graydon@mozilla.com>2011-03-31 14:52:29 +0000
commit50e354611fbecd4e47ca607e5e201b236eb558e0 (patch)
tree997fe4213060ec152c1b5617b1657d067bd7863a /src/comp
parent6a75740e96334407e8fcfcf5728eff2e7b8c3482 (diff)
downloadrust-50e354611fbecd4e47ca607e5e201b236eb558e0.tar.gz
rust-50e354611fbecd4e47ca607e5e201b236eb558e0.zip
Remove redundant parser logic.
These cases are all dealt with in parse_expr_inner.
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/front/parser.rs33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs
index 8562c56ae7a..e0324f7727b 100644
--- a/src/comp/front/parser.rs
+++ b/src/comp/front/parser.rs
@@ -1561,39 +1561,6 @@ impure fn parse_source_stmt(parser p) -> @ast.stmt {
             ret @spanned(lo, hi, ast.stmt_decl(decl));
         }
 
-        // Handle the (few) block-expr stmts first.
-
-        case (token.IF) {
-            auto e = parse_expr(p);
-            ret @spanned(lo, e.span, ast.stmt_expr(e));
-        }
-
-        case (token.FOR) {
-            auto e = parse_expr(p);
-            ret @spanned(lo, e.span, ast.stmt_expr(e));
-        }
-
-        case (token.WHILE) {
-            auto e = parse_expr(p);
-            ret @spanned(lo, e.span, ast.stmt_expr(e));
-        }
-
-        case (token.DO) {
-            auto e = parse_expr(p);
-            ret @spanned(lo, e.span, ast.stmt_expr(e));
-        }
-
-        case (token.ALT) {
-            auto e = parse_expr(p);
-            ret @spanned(lo, e.span, ast.stmt_expr(e));
-        }
-
-        case (token.LBRACE) {
-            auto e = parse_expr(p);
-            ret @spanned(lo, e.span, ast.stmt_expr(e));
-        }
-
-
         case (_) {
             if (peeking_at_item(p)) {
                 // Might be a local item decl.