From 1d9829183985b9c5c3b360d50506a732c1e9e802 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 27 Dec 2022 12:06:48 -0800 Subject: [PATCH] Allow named expression in subscript: `a[b := c]` Signed-off-by: Anders Kaseorg --- parser/python.lalrpop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/python.lalrpop b/parser/python.lalrpop index a73d835..4ec31c0 100644 --- a/parser/python.lalrpop +++ b/parser/python.lalrpop @@ -1023,7 +1023,7 @@ SubscriptList: ast::Expr = { }; Subscript: ast::Expr = { - Test<"all">, + NamedExpressionTest, ?> ":" ?> => { let lower = e1.map(Box::new); let upper = e2.map(Box::new);