Skip to content

Commit

Permalink
feat(compiler): Allow a newline character before a match guard (#1063)
Browse files Browse the repository at this point in the history
  • Loading branch information
ospencer committed Dec 10, 2021
1 parent 7e294f5 commit bf41a9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/parsing/parser.dyp
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ for_expr :
| FOR lparen block_body_expr? eols? SEMI eols? expr? eols? SEMI eols? expr? rparen block { Exp.for_ ~loc:(symbol_rloc dyp) $3 $7 $11 $13 }

match_branch :
| pattern [WHEN expr {$2}]? thickarrow expr { Mb.mk ~loc:(symbol_rloc dyp) $1 $4 $2 }
| pattern [eols? WHEN expr {$3}]? thickarrow expr { Mb.mk ~loc:(symbol_rloc dyp) $1 $4 $2 }

match_branches :
| match_branch [comma match_branch {$2}]* trailing_comma? { $1::$2 }
Expand Down

0 comments on commit bf41a9c

Please sign in to comment.