aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/parser.rs
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-03-25 23:11:46 -0400
committerGraydon Hoare <[email protected]>2011-03-31 14:52:29 +0000
commit50e354611fbecd4e47ca607e5e201b236eb558e0 (patch)
tree997fe4213060ec152c1b5617b1657d067bd7863a /src/comp/front/parser.rs
parenthandle unterminated block comments and line comment at eof (diff)
downloadrust-50e354611fbecd4e47ca607e5e201b236eb558e0.tar.xz
rust-50e354611fbecd4e47ca607e5e201b236eb558e0.zip
Remove redundant parser logic.
These cases are all dealt with in parse_expr_inner.
Diffstat (limited to 'src/comp/front/parser.rs')
-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 8562c56a..e0324f77 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.