This repository was archived by the owner on Apr 24, 2021. It is now read-only.
File tree 3 files changed +3
-18
lines changed
3 files changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,11 @@ let isSourceFile name =
46
46
|| Filename. check_suffix name " .mli"
47
47
48
48
let compiledNameSpace name =
49
- Str. split ( Str. regexp_string " - " ) name
49
+ String. split_on_char '-' name
50
50
|> List. map String. capitalize_ascii
51
51
|> String. concat " "
52
52
(* Remove underscores??? Whyyy bucklescript, whyyyy *)
53
- |> Str. split ( Str. regexp_string " _ " )
53
+ |> String. split_on_char '_'
54
54
|> String. concat " "
55
55
56
56
let compiledBaseName ~namespace name =
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ let newBsPackage rootPath =
79
79
match item |> Json. string with
80
80
| None -> opens
81
81
| Some s -> (
82
- let parts = Utils . split_on_char ' ' s in
82
+ let parts = String . split_on_char ' ' s in
83
83
match parts with
84
84
| "-open" :: name :: _ -> name :: opens
85
85
| _ -> opens))
Original file line number Diff line number Diff line change 1
- (*
2
- steal from OCaml stdlib
3
- https://github.com/ocaml/ocaml/blob/7c9c210884e1b46f21af5bb4dfab995bb3336cf7/stdlib/string.ml#L205-L214
4
- *)
5
- let split_on_char sep s =
6
- let open String in
7
- let r = ref [] in
8
- let j = ref (length s) in
9
- for i = length s - 1 downto 0 do
10
- if unsafe_get s i = sep then (
11
- r := sub s (i + 1 ) (! j - i - 1 ) :: ! r;
12
- j := i)
13
- done ;
14
- sub s 0 ! j :: ! r
15
-
16
1
let topLoc fname =
17
2
{
18
3
Location. loc_start =
You can’t perform that action at this time.
0 commit comments