Skip to content

Commit

Permalink
Remove support for 'when' in alt-patterns from parser
Browse files Browse the repository at this point in the history
Issue #1396
  • Loading branch information
Austin Seipp authored and brson committed Jan 10, 2012
1 parent a94b1cc commit 070b1c8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/comp/syntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}];
}
Expand Down

0 comments on commit 070b1c8

Please sign in to comment.