diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-07 15:32:04 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-07 17:39:03 -0700 |
| commit | 2810ea9a687df32064dc3fa7db48f52e27d39ed5 (patch) | |
| tree | 4fb386e360cc050a7a05afe564cec58fe65a245a /src/libsyntax/parse | |
| parent | 073df63c72faed7a773cb9ad0ad5e27edcb4f9f1 (diff) | |
| download | rust-2810ea9a687df32064dc3fa7db48f52e27d39ed5.tar.gz rust-2810ea9a687df32064dc3fa7db48f52e27d39ed5.zip | |
Convert 'again' to 'loop'. Remove 'again' keyword
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/lexer.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index 2d000074936..b85262cb79d 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -55,7 +55,7 @@ fn strip_doc_comment_decoration(comment: ~str) -> ~str { let mut i = max.get_default(uint::max_value); for lines.each |line| { if line.trim().is_empty() { - again; + loop; } for line.each_chari |j, c| { if j >= i { diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs index e93f3cfe9c6..2103af39bae 100644 --- a/src/libsyntax/parse/lexer.rs +++ b/src/libsyntax/parse/lexer.rs @@ -306,7 +306,7 @@ fn scan_digits(rdr: string_reader, radix: uint) -> ~str { let mut rslt = ~""; loop { let c = rdr.curr; - if c == '_' { bump(rdr); again; } + if c == '_' { bump(rdr); loop; } match char::to_digit(c, radix) { Some(_) => { str::push_char(rslt, c); diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 498eab18248..03a4c016b50 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -888,7 +888,7 @@ struct parser { return pexpr(self.parse_sugary_call_expr(~"do", expr_do_body)); } else if self.eat_keyword(~"while") { return pexpr(self.parse_while_expr()); - } else if self.eat_keyword(~"again") || self.eat_keyword(~"loop") { + } else if self.eat_keyword(~"loop") { return pexpr(self.parse_loop_expr()); } else if self.eat_keyword(~"match") { return pexpr(self.parse_alt_expr()); @@ -1138,7 +1138,7 @@ struct parser { } _ => self.unexpected() } - again; + loop; } if self.expr_is_complete(e) { break; } match copy self.token { @@ -3096,7 +3096,7 @@ struct parser { } self.expect(token::LBRACE); common_fields = Some(self.parse_struct_def()); - again; + loop; } let vis = self.parse_visibility(); diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index cc1b049ab93..c2099fa447f 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -412,7 +412,7 @@ fn contextual_keyword_table() -> hashmap<~str, ()> { fn restricted_keyword_table() -> hashmap<~str, ()> { let words = str_hash(); let keys = ~[ - ~"again", ~"assert", + ~"assert", ~"break", ~"const", ~"copy", ~"do", ~"drop", |
