8000 Allow comprehension syntax after assignment in argument list · seanpm2001/Lezer-Parser_Python@151bccb · GitHub
[go: up one dir, main page]

Skip to content

Commit 151bccb

Browse files
committed
Allow comprehension syntax after assignment in argument list
FIX: Fix parsing of argument lists that are a comprehension that start with an assignment. Closes codemirror/dev#1221
1 parent 8ee02d7 commit 151bccb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/python.grammar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ BinaryExpression {
222222

223223
ArgList { "(" commaSep<argument>? ")" }
224224

225-
argument { test compFor? | VariableName AssignOp{"=" | ":="} test | "**" test | "*" test }
225+
argument { test compFor? | VariableName AssignOp{"=" | ":="} test compFor? | "**" test | "*" test }
226226

227227
compFor {
228228
kw<"async">? kw<"for"> commaSep<expression> kw<"in"> testInner (compFor | compIf)?

0 commit comments

Comments
 (0)
0