From 63e4a36e27ac1240774cd1355e05cd10ddeda67c Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Thu, 29 Dec 2022 02:16:44 +0800 Subject: [PATCH] added check: named arguments must follow bare star --- parser/python.lalrpop | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/parser/python.lalrpop b/parser/python.lalrpop index 70ad18f..7683b60 100644 --- a/parser/python.lalrpop +++ b/parser/python.lalrpop @@ -667,7 +667,7 @@ TypedParameter: ast::Arg = { // TODO: figure out another grammar that makes this inline no longer required. #[inline] ParameterListStarArgs: (Option>, Vec, Vec, Option>) = { - "*" )*> )?> => { + "*" )*> )?> =>? { // Extract keyword arguments: let mut kwonlyargs = Vec::new(); let mut kw_defaults = Vec::new(); @@ -685,7 +685,14 @@ ParameterListStarArgs: (Option>, Vec, Vec