Remove support for 'when' in alt-patterns from parser

Issue #1396
This commit is contained in:
Austin Seipp 2012-01-09 19:17:02 -06:00 committed by Brian Anderson
parent a94b1ccacb
commit 070b1c8333
1 changed files with 1 additions and 5 deletions

View File

@ -1389,11 +1389,7 @@ fn parse_alt_expr(p: parser) -> @ast::expr {
while p.peek() != token::RBRACE {
let pats = parse_pats(p);
let guard = none;
if eat_word(p, "when") {
guard = some(parse_expr(p));
} else if eat_word(p, "if") {
guard = some(parse_expr(p));
}
if eat_word(p, "if") { guard = some(parse_expr(p)); }
let blk = parse_block(p);
arms += [{pats: pats, guard: guard, body: blk}];
}