Skip to content

Commit

Permalink
Align MatchCase end location
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed May 30, 2023
1 parent ae3a477 commit 1b9311f
Show file tree
Hide file tree
Showing 2 changed files with 1,227 additions and 1,255 deletions.
3 changes: 2 additions & 1 deletion parser/src/python.lalrpop
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ MatchStatement: ast::Stmt = {
}

MatchCase: ast::MatchCase = {
<start:@L> "case" <pattern:Patterns> <guard:(Guard)?> ":" <body:Suite> <end:@R> => {
<start:@L> "case" <pattern:Patterns> <guard:(Guard)?> ":" <body:Suite> => {
let end = body.last().unwrap().end();
ast::MatchCase {
pattern,
guard: guard.map(Box::new),
Expand Down
Loading

0 comments on commit 1b9311f

Please sign in to comment.