Skip to content

Commit 1e293ae

Browse files
committed
Remove driver for ml parser.
1 parent 5b75348 commit 1e293ae

File tree

7 files changed

+12
-67
lines changed

7 files changed

+12
-67
lines changed

jscomp/syntax/cli/res_cli.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ module CliArgProcessor = struct
235235
let print_engine =
236236
match target with
237237
| "binary" -> Res_driver_binary.print_engine
238-
| "ml" -> Res_driver_ml_parser.print_engine
238+
| "ml" -> Res_driver_ml_printer.print_engine
239239
| "ast" -> Res_ast_debugger.print_engine
240240
| "sexp" -> Res_ast_debugger.sexp_print_engine
241241
| "comments" -> Res_ast_debugger.comments_print_engine

jscomp/syntax/src/res_comment.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ let make_multi_line_comment ~loc ~doc_comment ~standalone txt =
4747
prev_tok_end_pos = Lexing.dummy_pos;
4848
}
4949

50-
let from_ocaml_comment ~loc ~txt ~prev_tok_end_pos =
51-
{txt; loc; style = MultiLine; prev_tok_end_pos}
52-
5350
let trim_spaces s =
5451
let len = String.length s in
5552
if len = 0 then s

jscomp/syntax/src/res_comment.mli

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ val is_single_line_comment : t -> bool
1717
val make_single_line_comment : loc:Location.t -> string -> t
1818
val make_multi_line_comment :
1919
loc:Location.t -> doc_comment:bool -> standalone:bool -> string -> t
20-
val from_ocaml_comment :
21-
loc:Location.t -> txt:string -> prev_tok_end_pos:Lexing.position -> t
2220
val trim_spaces : string -> string

jscomp/syntax/src/res_driver_ml_parser.ml

Lines changed: 0 additions & 53 deletions
This file was deleted.

jscomp/syntax/src/res_driver_ml_parser.mli

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
let print_engine =
2+
Res_driver.
3+
{
4+
print_implementation =
5+
(fun ~width:_ ~filename:_ ~comments:_ structure ->
6+
Pprintast.structure Format.std_formatter structure);
7+
print_interface =
8+
(fun ~width:_ ~filename:_ ~comments:_ signature ->
9+
Pprintast.signature Format.std_formatter signature);
10+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
val print_engine : Res_driver.print_engine

0 commit comments

Comments
 (0)