diff options
| author | Paul Stansifer <paul.stansifer@gmail.com> | 2012-05-09 09:17:27 -0700 |
|---|---|---|
| committer | Paul Stansifer <paul.stansifer@gmail.com> | 2012-05-10 15:09:33 -0700 |
| commit | 13c924c049465f91dda8b7cee416d1fceaf4a596 (patch) | |
| tree | ac4a0d53537461f4c5be4af8109022bd9acd0630 /src/librustsyntax/parse/parser.rs | |
| parent | 5af58e79269600c962f1de3bee57e804a36695a8 (diff) | |
| download | rust-13c924c049465f91dda8b7cee416d1fceaf4a596.tar.gz rust-13c924c049465f91dda8b7cee416d1fceaf4a596.zip | |
Remove `do { ... } while ...` from the language.
Diffstat (limited to 'src/librustsyntax/parse/parser.rs')
| -rw-r--r-- | src/librustsyntax/parse/parser.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/librustsyntax/parse/parser.rs b/src/librustsyntax/parse/parser.rs index 7b1b9823a1f..125dbb927f4 100644 --- a/src/librustsyntax/parse/parser.rs +++ b/src/librustsyntax/parse/parser.rs @@ -727,8 +727,6 @@ fn parse_bottom_expr(p: parser) -> pexpr { ret pexpr(parse_for_expr(p)); } else if eat_keyword(p, "while") { ret pexpr(parse_while_expr(p)); - } else if eat_keyword(p, "do") { - ret pexpr(parse_do_while_expr(p)); } else if eat_keyword(p, "loop") { ret pexpr(parse_loop_expr(p)); } else if eat_keyword(p, "alt") { @@ -1233,15 +1231,6 @@ fn parse_while_expr(p: parser) -> @expr { ret mk_expr(p, lo, hi, expr_while(cond, body)); } -fn parse_do_while_expr(p: parser) -> @expr { - let lo = p.last_span.lo; - let body = parse_block_no_value(p); - expect_keyword(p, "while"); - let cond = parse_expr(p); - let mut hi = cond.span.hi; - ret mk_expr(p, lo, hi, expr_do_while(body, cond)); -} - fn parse_loop_expr(p: parser) -> @expr { let lo = p.last_span.lo; let body = parse_block_no_value(p); |
