8000 Allow field declarations with a type but no assignment · jrdek/python@3c02a74 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3c02a74

Browse files
committed
Allow field declarations with a type but no assignment
1 parent e2278be commit 3c02a74

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
@@ -43,7 +43,7 @@ simpleStatement {
4343
}
4444

4545
smallStatement {
46-
AssignStatement { expressions TypeDef? (AssignOp{"="} (YieldExpression | expressions))+ } |
46+
AssignStatement { expressions (TypeDef? (AssignOp{"="} (YieldExpression | expressions))+ | TypeDef) } |
4747
UpdateStatement { expressions UpdateOp (YieldExpression | commaSep<test>) } |
4848
ExpressionStatement { expressions } |
4949
DeleteStatement { kw<"del"> commaSep<expression> } |

0 commit comments

Comments
 (0)
0