Skip to content

Commit

Permalink
Allow Exclamation chaining on new lines
Browse files Browse the repository at this point in the history
  • Loading branch information
tjammer committed Oct 18, 2024
1 parent 9572f62 commit a1579cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/semicolons.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ let default next state =

let rec newline ~lnum lexbuf next state =
match (state.last, next) with
| _, (Parser.Dot | Eof | Rcurly | Else | Or | And | Hbar | Rbrack | Rpar) ->
| ( _,
( Parser.Dot | Exclamation | Eof | Rcurly | Else | Or | And | Hbar
| Rbrack | Rpar ) ) ->
(* These tokens continue expressions on the new line. Rcurly closes
the block; in that case we do not want to insert a semicolon. Some
with Eof *)
Expand Down

0 comments on commit a1579cf

Please sign in to comment.