diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-18 12:20:18 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-22 09:20:37 -0700 |
| commit | dd66e7549b72575d5d7e06c0173e702e28cdfba7 (patch) | |
| tree | b3ce10fb564b8b5fb4dc4af73bd380e6b39d32dd /src/libsyntax/print/pprust.rs | |
| parent | 46d4bbbae4e52b79c23136b926c1e3b1f187ce4b (diff) | |
| download | rust-dd66e7549b72575d5d7e06c0173e702e28cdfba7.tar.gz rust-dd66e7549b72575d5d7e06c0173e702e28cdfba7.zip | |
Preliminary support for labeled break/continue for `loop`s
This patch adds preliminary middle-end support (liveness and trans) for breaks and `loop`s to `loop` constructs that have labels. while and for loops can't have labels yet. Progress on #2216
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 909f59552d4..33915c8c0c9 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1180,7 +1180,10 @@ fn print_expr(s: ps, &&expr: @ast::expr) { ast::expr_loop(blk, opt_ident) => { head(s, ~"loop"); space(s.s); - opt_ident.iter(|ident| {print_ident(s, *ident); space(s.s)}); + opt_ident.iter(|ident| { + print_ident(s, *ident); + word_space(s, ~":"); + }); print_block(s, blk); } ast::expr_match(expr, arms) => { |
