syntax: implement foreach .. in .. { .. } via desugaring.

This commit is contained in:
Graydon Hoare
2013-07-29 17:25:00 -07:00
parent 9a2d183d6a
commit c29e9fb60b
17 changed files with 215 additions and 3 deletions

View File

@@ -465,6 +465,7 @@ pub enum expr_ {
expr_cast(@expr, Ty),
expr_if(@expr, Block, Option<@expr>),
expr_while(@expr, Block),
expr_for_loop(@pat, @expr, Block),
/* 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. */