Skip to content

Commit

Permalink
Fix the spans of catch blocks to include the do
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc committed Jul 24, 2017
1 parent b80e946 commit 5388470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2243,9 +2243,9 @@ impl<'a> Parser<'a> {
attrs);
}
if self.is_catch_expr() {
let lo = self.span;
assert!(self.eat_keyword(keywords::Do));
assert!(self.eat_keyword(keywords::Catch));
let lo = self.prev_span;
return self.parse_catch_expr(lo, attrs);
}
if self.eat_keyword(keywords::Return) {
Expand Down

0 comments on commit 5388470

Please sign in to comment.