allow dotless nullary patterns inside or-patterns

This commit is contained in:
Tim Chevalier 2012-01-18 18:28:56 -08:00
parent a453197734
commit 209d8c854f

View File

@ -1508,7 +1508,8 @@ fn parse_pat(p: parser) -> @ast::pat {
args = a.node;
hi = a.span.hi;
}
token::LBRACE. | token::RPAREN. | token::COMMA. { args = []; }
token::LBRACE. | token::RPAREN. | token::COMMA.
| token::BINOP(token::OR.) { args = []; }
// take this out once the libraries change
token::DOT. { args = []; p.bump(); }
_ { expect(p, token::LPAREN); fail; }