diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-08-13 17:37:08 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-08-13 17:37:08 -0700 |
| commit | 55ee06b8ce70cf86e9df7e501f700cc3e520376d (patch) | |
| tree | f1adfcb85145ce8f3bdd855cc47894d87834734f /src/libsyntax/parse/parser.rs | |
| parent | 36d8682269fb29a10da93634cff4a9320c45a2f4 (diff) | |
| download | rust-55ee06b8ce70cf86e9df7e501f700cc3e520376d.tar.gz rust-55ee06b8ce70cf86e9df7e501f700cc3e520376d.zip | |
libsyntax: Accept "1..3" as the preferred form of "1 to 3" in patterns
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index b50d4be4ae0..685a6a34405 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1797,7 +1797,7 @@ class parser { || self.is_keyword(~"false") { let val = self.parse_expr_res(RESTRICT_NO_BAR_OP); - if self.eat_keyword(~"to") { + if self.eat_keyword(~"to") || self.eat(token::DOTDOT) { let end = self.parse_expr_res(RESTRICT_NO_BAR_OP); pat = pat_range(val, end); } else { |
