From 50e354611fbecd4e47ca607e5e201b236eb558e0 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 25 Mar 2011 23:11:46 -0400 Subject: [PATCH] Remove redundant parser logic. These cases are all dealt with in parse_expr_inner. --- src/comp/front/parser.rs | 33 --------------------------------- 1 file changed, 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.