Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit e2438a4

Browse files
committed
Add a rule for blocks.
1 parent 5121e36 commit e2438a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Language/Python/Assignment.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ expressionChoices =
198198
expressions :: Assignment Term
199199
expressions = makeTerm'' <$> location <*> manyTerm expression
200200

201+
block :: Assignment Term
202+
block = symbol Block *> children (makeTerm <$> location <*> manyTerm expression)
203+
201204
expressionStatement :: Assignment Term
202205
expressionStatement = makeTerm'' <$> symbol ExpressionStatement <*> children (someTerm expression)
203206

0 commit comments

Comments
 (0)