diff options
| author | Marijn Haverbeke <[email protected]> | 2011-03-25 16:28:16 +0100 |
|---|---|---|
| committer | Marijn Haverbeke <[email protected]> | 2011-03-27 14:11:23 +0200 |
| commit | 6ecdc04788334420db05d9894e18d1d7a605ab4f (patch) | |
| tree | aba6169530f041b59507490b9ab28b1ac2835d18 /src/comp/front/parser.rs | |
| parent | shootout: Hoist out the vector indexing on nbody; don't rely on LICM, which i... (diff) | |
| download | rust-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.rs | 10 |
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()) { |