Preliminary support for labeled break/continue for loops

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
This commit is contained in:
Tim Chevalier
2012-10-18 12:20:18 -07:00
parent 46d4bbbae4
commit dd66e7549b
10 changed files with 232 additions and 98 deletions

View File

@@ -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) => {