You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, _PyPegen_get_last_comprehension_item(PyPegen_last_item(b, comprehension_ty)), "Generator expression must be parenthesized") }
1084
1085
| a=NAME b='=' expression for_if_clauses {
1085
1086
RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "invalid syntax. Maybe you meant '==' or ':=' instead of '='?")}
1087
+
| (args ',')? a=NAME b='=' &(',' | ')') {
1088
+
RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "expected argument value expression")}
1086
1089
| a=args b=for_if_clauses { _PyPegen_nonparen_genexp_in_call(p, a, b) }
1087
1090
| args ',' a=expression b=for_if_clauses {
1088
1091
RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, _PyPegen_get_last_comprehension_item(PyPegen_last_item(b, comprehension_ty)), "Generator expression must be parenthesized") }
@@ -1095,6 +1098,8 @@ invalid_kwarg:
1095
1098
| !(NAME '=') a=expression b='=' {
1096
1099
RAISE_SYNTAX_ERROR_KNOWN_RANGE(
1097
1100
a, b, "expression cannot contain assignment, perhaps you meant \"==\"?") }
1101
+
| a='**' expression '=' b=expression {
1102
+
RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "cannot assign to keyword argument unpacking") }
1098
1103
1099
1104
# IMPORTANT: Note that the "_without_invalid" suffix causes the rule to not call invalid rules under it
0 commit comments