summaryrefslogtreecommitdiffstats
path: root/Grammar/python.gram
diff options
context:
space:
mode:
Diffstat (limited to 'Grammar/python.gram')
-rw-r--r--Grammar/python.gram3
1 files changed, 3 insertions, 0 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram
index a771abf..19d9bb3 100644
--- a/Grammar/python.gram
+++ b/Grammar/python.gram
@@ -627,6 +627,9 @@ incorrect_arguments:
| args ',' '*' { RAISE_SYNTAX_ERROR("iterable argument unpacking follows keyword argument unpacking") }
| a=expression for_if_clauses ',' [args | expression for_if_clauses] {
RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "Generator expression must be parenthesized") }
+ | a=args for_if_clauses { _PyPegen_nonparen_genexp_in_call(p, a) }
+ | args ',' a=expression for_if_clauses {
+ RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "Generator expression must be parenthesized") }
| a=args ',' args { _PyPegen_arguments_parsing_error(p, a) }
invalid_kwarg:
| a=expression '=' {