diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-01-18 18:28:56 -0800 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-01-18 21:29:02 -0800 |
| commit | 209d8c854f99ffa14b7292035837afa0852eb28b (patch) | |
| tree | 849ba8a32d3b1a0c06dd6c5558afbd9af061bd24 /src/comp | |
| parent | a45319773468617092e79d950afe6f7704a32420 (diff) | |
| download | rust-209d8c854f99ffa14b7292035837afa0852eb28b.tar.gz rust-209d8c854f99ffa14b7292035837afa0852eb28b.zip | |
allow dotless nullary patterns inside or-patterns
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index d7f5e205bea..9a3f0b4738f 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -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; } |
