Skip to content

Commit

Permalink
GRAMMAR: allowing pattern-matching expressions (only in parens) as th…
Browse files Browse the repository at this point in the history
…e 'rangeexpr' for a comprehension
  • Loading branch information
getify committed Sep 6, 2024
1 parent 4b2fda0 commit 0bc27f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ DepCondBinaryBoolExpr := NamedBoolRightExpr | SymbolicBoolRightExpr | ("(" WhS
(*************** Loops/Comprehensions ***************)
ComprExpr := (((ComprRangeNoEachExpr WhSp+ ComprOpNoEach) | (ComprRangeEachExpr WhSp+ ComprOpEach) | (ComprExpr WhSp+ ComprOp)) WhSp+ ComprIterationExpr) | ("(" WhSp* ComprExpr WhSp* ")");
ComprRangeNoEachExpr := IdentifierExpr | CallExpr | DataStructLit | ClosedRangeExpr | ExprAccessExpr | DoComprExpr | DoLoopComprExpr | ("(" WhSp* ComprRangeNoEachExpr WhSp* ")");
ComprRangeNoEachExpr := IdentifierExpr | CallExpr | DataStructLit | ClosedRangeExpr | ExprAccessExpr | DoComprExpr | DoLoopComprExpr | ("(" WhSp* (ComprRangeNoEachExpr | MatchExpr) WhSp* ")");
ComprRangeEachExpr := CondClause | ComprRangeNoEachExpr | ("(" WhSp* ComprRangeEachExpr WhSp* ")");
ComprOp := ComprOpNoEach | ComprOpEach;
ComprOpNamed := ComprOpEach | ComprOpNamedNoEach;
Expand Down

0 comments on commit 0bc27f7

Please sign in to comment.