Skip to content

Commit 4a2c4aa

Browse files
committed
Align MatchCase end location
1 parent ae3a477 commit 4a2c4aa

File tree

2 files changed

+1201
-1229
lines changed

2 files changed

+1201
-1229
lines changed

parser/src/python.lalrpop

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ MatchStatement: ast::Stmt = {
387387
}
388388

389389
MatchCase: ast::MatchCase = {
390-
<start:@L> "case" <pattern:Patterns> <guard:(Guard)?> ":" <body:Suite> <end:@R> => {
390+
<start:@L> "case" <pattern:Patterns> <guard:(Guard)?> ":" <body:Suite> => {
391+
let end = body.last().unwrap().end();
391392
ast::MatchCase {
392393
pattern,
393394
guard: guard.map(Box::new),

0 commit comments

Comments
 (0)