From 6ecdc04788334420db05d9894e18d1d7a605ab4f Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Fri, 25 Mar 2011 16:28:16 +0100 Subject: Add support for break and cont to rustc Testing proper cleanup is hampered by https://github.com/graydon/rust/issues/293 --- src/comp/front/parser.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/comp/front/parser.rs') 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()) { -- cgit v1.2.3