Allow any alternative (not just a block) to follow a nullary tag pattern

This commit is contained in:
Tim Chevalier 2012-01-18 19:15:56 -08:00
parent 209d8c854f
commit 8c97854c7d

View File

@ -1508,11 +1508,9 @@ fn parse_pat(p: parser) -> @ast::pat {
args = a.node;
hi = a.span.hi;
}
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; }
_ { args = []; }
}
// at this point, we're not sure whether it's a tag or a bind
if vec::len(args) == 0u &&