]> git.lizzy.rs Git - rust.git/commitdiff
Another minor parser fix for nullary-tag patterns
authorTim Chevalier <chevalier@alum.wellesley.edu>
Thu, 19 Jan 2012 01:44:19 +0000 (17:44 -0800)
committerTim Chevalier <chevalier@alum.wellesley.edu>
Thu, 19 Jan 2012 05:29:02 +0000 (21:29 -0800)
src/comp/syntax/parse/parser.rs

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