about summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2013-09-08 22:08:01 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2013-09-08 22:08:01 +1000
commit07351b44c657225d45e2aa0a302ccd28f96839a8 (patch)
treee61809a471532d32ed51f9d72ea0536b9fef471c /src/libsyntax/ast.rs
parentb609d022c4df307e4d68499b063c81a9ecb1e9cf (diff)
downloadrust-07351b44c657225d45e2aa0a302ccd28f96839a8.tar.gz
rust-07351b44c657225d45e2aa0a302ccd28f96839a8.zip
syntax: implement labelled breaks for `for`.
`for` desugars to `loop` so it is trivial to just desugar to `loop` while
retaining any label.
Diffstat (limited to 'src/libsyntax/ast.rs')
-rw-r--r--src/libsyntax/ast.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index b993f98ec82..6957f9ae351 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -528,7 +528,7 @@ pub enum Expr_ {
     ExprCast(@Expr, Ty),
     ExprIf(@Expr, Block, Option<@Expr>),
     ExprWhile(@Expr, Block),
-    ExprForLoop(@Pat, @Expr, Block),
+    ExprForLoop(@Pat, @Expr, Block, Option<Ident>),
     /* Conditionless loop (can be exited with break, cont, or ret)
        Same semantics as while(true) { body }, but typestate knows that the
        (implicit) condition is always true. */