Allow starred expressions in subscripts

This commit is contained in:
Charlie Marsh 2023-02-20 17:59:35 -05:00
parent 4bdc2d47c1
commit 8aa3bc93f3
3 changed files with 654 additions and 1 deletions

View file

@ -1037,7 +1037,7 @@ SubscriptList: ast::Expr = {
};
Subscript: ast::Expr = {
NamedExpressionTest,
TestOrStarNamedExpr,
<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);