@@ -186,17 +186,11 @@ end = struct
186
186
| Print -> " printer"
187
187
188
188
(* TODO: we could at Reason here *)
189
- type lang = Ocaml | Rescript
189
+ type lang = Rescript
190
190
let string_of_lang lang =
191
191
match lang with
192
- | Ocaml -> " ocaml"
193
192
| Rescript -> " rescript"
194
193
195
- let parse_ocaml src filename =
196
- let lexbuf = Lexing. from_string src in
197
- Location. init lexbuf filename;
198
- Parse. implementation lexbuf
199
-
200
194
let parse_rescript src filename =
201
195
let p = Parser. make src filename in
202
196
let structure = ResParser. parse_implementation p in
@@ -214,10 +208,6 @@ end = struct
214
208
fun _ ->
215
209
let _ = Sys. opaque_identity (parse_rescript src filename) in
216
210
()
217
- | Ocaml , Parse ->
218
- fun _ ->
219
- let _ = Sys. opaque_identity (parse_ocaml src filename) in
220
- ()
221
211
| Rescript , Print ->
222
212
let p = Parser. make src filename in
223
213
let ast = ResParser. parse_implementation p in
@@ -230,7 +220,6 @@ end = struct
230
220
Doc. to_string ~width: 80 (Printer. print_structure ast cmt_tbl))
231
221
in
232
222
()
233
- | _ -> fun _ -> ()
234
223
in
235
224
let b = Benchmark. make ~name ~f: benchmark_fn () in
236
225
Benchmark. launch b;
@@ -239,16 +228,13 @@ end = struct
239
228
let run () =
240
229
let data_dir = " jscomp/syntax/benchmarks/data" in
241
230
benchmark (Filename. concat data_dir " RedBlackTree.res" ) Rescript Parse ;
242
- benchmark (Filename. concat data_dir " RedBlackTree.ml" ) Ocaml Parse ;
243
231
benchmark (Filename. concat data_dir " RedBlackTree.res" ) Rescript Print ;
244
232
benchmark
245
233
(Filename. concat data_dir " RedBlackTreeNoComments.res" )
246
234
Rescript Print ;
247
235
benchmark (Filename. concat data_dir " Napkinscript.res" ) Rescript Parse ;
248
- benchmark (Filename. concat data_dir " Napkinscript.ml" ) Ocaml Parse ;
249
236
benchmark (Filename. concat data_dir " Napkinscript.res" ) Rescript Print ;
250
237
benchmark (Filename. concat data_dir " HeroGraphic.res" ) Rescript Parse ;
251
- benchmark (Filename. concat data_dir " HeroGraphic.ml" ) Ocaml Parse ;
252
238
benchmark (Filename. concat data_dir " HeroGraphic.res" ) Rescript Print
253
239
end
254
240
0 commit comments