From 8c97854c7d5da18d930ba82b04a4a071f2c43594 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Wed, 18 Jan 2012 19:15:56 -0800 Subject: [PATCH] Allow any alternative (not just a block) to follow a nullary tag pattern --- src/comp/syntax/parse/parser.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 9a3f0b4738fa..13804d735e45 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -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 &&