diff options
| author | Or Brostovski <[email protected]> | 2010-08-31 06:07:32 +0300 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-09-30 13:45:57 -0700 |
| commit | 4a3404803b6c6de079a590a4bc96313d9a68f164 (patch) | |
| tree | 705b0f8710b408c49e3a609bb7ddfc6bdb4a68b3 /src/boot/fe/token.ml | |
| parent | Closed issue 154 - prevents compiler from compiliing a line to zero statements (diff) | |
| download | rust-4a3404803b6c6de079a590a4bc96313d9a68f164.tar.xz rust-4a3404803b6c6de079a590a4bc96313d9a68f164.zip | |
implemented break for while-loop case
ast.ml - added break and cont statements
item.ml - added break and cont statements
lexer.mll - added break and cont statements
token.ml - added break and cont statements
trans.ml - implemented the break statement for the while-loop case
- replaced hash table accesses with get_stmt_depth where needed
type.ml = added break and cont statements
typestate.ml - implemented the break statement for the while-loop case
- added shorthand filter_live_block_slots
walk.ml - added break and cont statements
while-with-break.rs - code for testing while loops
Diffstat (limited to 'src/boot/fe/token.ml')
| -rw-r--r-- | src/boot/fe/token.ml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/boot/fe/token.ml b/src/boot/fe/token.ml index 85dd2a13..cd41ec2f 100644 --- a/src/boot/fe/token.ml +++ b/src/boot/fe/token.ml @@ -71,6 +71,8 @@ type token = | PUT | RET | BE + | BREAK + | CONT (* Type and type-state keywords *) | TYPE @@ -226,6 +228,8 @@ let rec string_of_tok t = | PUT -> "put" | RET -> "ret" | BE -> "be" + | BREAK -> "break" + | CONT -> "cont" (* Type and type-state keywords *) | TYPE -> "type" |