Add support for break and cont to rustc

Testing proper cleanup is hampered by
https://github.com/graydon/rust/issues/293
This commit is contained in:
Marijn Haverbeke
2011-03-25 16:28:16 +01:00
parent 9c5affda1a
commit 6ecdc04788
8 changed files with 164 additions and 9 deletions

View File

@@ -829,6 +829,16 @@ impure fn parse_bottom_expr(parser p) -> @ast.expr {
}
}
case (token.BREAK) {
p.bump();
ex = ast.expr_break;
}
case (token.CONT) {
p.bump();
ex = ast.expr_cont;
}
case (token.PUT) {
p.bump();
alt (p.peek()) {