Remove do { ... } while ...
from the language.
This commit is contained in:
parent
5af58e7926
commit
13c924c049
16 changed files with 11 additions and 118 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue