File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -311,9 +311,7 @@ let command ~debug ~emitter ~path =
311
311
cases
312
312
|> List. filter_map (fun ((label : Longident.t Location.loc ), _ ) ->
313
313
match label.txt with
314
- | Longident. Lident s
315
- when String. length s > 0
316
- && not (Char. equal s.[0 ] (Char. uppercase_ascii s.[0 ])) ->
314
+ | Longident. Lident s when Utils. isFirstCharUppercase s ->
317
315
Some label
318
316
| _ -> None )
319
317
|> List. iter (fun label -> emitter |> emitRecordLabel ~label ~debug );
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ let endsWith s suffix =
15
15
let l = String. length s in
16
16
p < = String. length s && String. sub s (l - p) p = suffix
17
17
18
+ let isFirstCharUppercase s =
19
+ String. length s > 0 && not (Char. equal s.[0 ] (Char. uppercase_ascii s.[0 ]))
20
+
18
21
let cmtPosToPosition {Lexing. pos_lnum; pos_cnum; pos_bol} =
19
22
Protocol. {line = pos_lnum - 1 ; character = pos_cnum - pos_bol}
20
23
You can’t perform that action at this time.
0 commit comments