Skip to content

Commit

Permalink
libsyntax: Fix a parsing problem with the temporary syntax for by-val…
Browse files Browse the repository at this point in the history
…ue pattern match bindings
  • Loading branch information
pcwalton committed Aug 1, 2012
1 parent 300e2b8 commit 899400c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1693,8 +1693,8 @@ class parser {
}
}
tok {
if !is_ident(tok) || self.is_keyword(~"true")
|| self.is_keyword(~"false") {
if (!is_ident(tok) && tok != token::BINOP(token::PLUS)) ||
self.is_keyword(~"true") || self.is_keyword(~"false") {
let val = self.parse_expr_res(RESTRICT_NO_BAR_OP);
if self.eat_keyword(~"to") {
let end = self.parse_expr_res(RESTRICT_NO_BAR_OP);
Expand Down

0 comments on commit 899400c

Please sign in to comment.