aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/parser.rs
diff options
context:
space:
mode:
authorMarijn Haverbeke <[email protected]>2011-03-25 16:28:16 +0100
committerMarijn Haverbeke <[email protected]>2011-03-27 14:11:23 +0200
commit6ecdc04788334420db05d9894e18d1d7a605ab4f (patch)
treeaba6169530f041b59507490b9ab28b1ac2835d18 /src/comp/front/parser.rs
parentshootout: Hoist out the vector indexing on nbody; don't rely on LICM, which i... (diff)
downloadrust-6ecdc04788334420db05d9894e18d1d7a605ab4f.tar.xz
rust-6ecdc04788334420db05d9894e18d1d7a605ab4f.zip
Add support for break and cont to rustc
Testing proper cleanup is hampered by https://github.com/graydon/rust/issues/293
Diffstat (limited to 'src/comp/front/parser.rs')
-rw-r--r--src/comp/front/parser.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs
index dad41e2e..c8130b0b 100644
--- a/src/comp/front/parser.rs
+++ b/src/comp/front/parser.rs
@@ -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()) {