Skip to content

Commit

Permalink
Improve error location for non-exhaustive matches
Browse files Browse the repository at this point in the history
  • Loading branch information
tjammer committed Sep 11, 2024
1 parent 0dbb198 commit ee72465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ expr_no_ident:
{ let arg = {apass = pass_attr_of_opt None; aexpr; aloc = $loc(aexpr)} in
Pipe_tail ($loc, arg, Pip_expr pipeable) }
| Match; expr = passed(expr); Lcurly; option(Hbar); clauses = clauses; Rcurly
{ Match ($loc, fst expr, snd expr, clauses) }
{ Match (($startpos, $endpos(expr)), fst expr, snd expr, clauses) }
| Ampersand; expr = expr; Equal; newval = expr; %prec Below_Ampersand
{ Set ($loc, ($loc(expr), expr), newval) }
| id = Path_id; expr = expr; %prec Path { Local_use ($loc, id, expr) }
Expand Down

0 comments on commit ee72465

Please sign in to comment.