Merge pull request #4358 from harupy/fix-slice-location

Fix `Slice` location
This commit is contained in:
Jeong YunWon 2022-12-26 16:03:09 +09:00 committed by GitHub
commit 3aa0096212
3 changed files with 123 additions and 1 deletions

View file

@ -1024,7 +1024,7 @@ SubscriptList: ast::Expr = {
Subscript: ast::Expr = {
Test<"all">,
<e1:Test<"all">?> <location:@L> ":" <e2:Test<"all">?> <e3:SliceOp?> <end_location:@R> => {
<location:@L> <e1:Test<"all">?> ":" <e2:Test<"all">?> <e3:SliceOp?> <end_location:@R> => {
let lower = e1.map(Box::new);
let upper = e2.map(Box::new);
let step = e3.flatten().map(Box::new);