Skip to content

Commit a363dd8

Browse files
committed
Remove unused -as-ppx which exposes the internal AST.
1 parent c6100bc commit a363dd8

File tree

4 files changed

+10
-71
lines changed

4 files changed

+10
-71
lines changed

compiler/bsc/rescript_compiler_main.ml

+10-18
Original file line numberDiff line numberDiff line change
@@ -134,23 +134,16 @@ let ppf = Format.err_formatter
134134
(* Error messages to standard error formatter *)
135135

136136
let anonymous ~(rev_args : string list) =
137-
if !Js_config.as_ppx then
138-
match rev_args with
139-
| [output; input] ->
140-
Ppx_apply.apply_lazy ~source:input ~target:output
141-
Ppx_entry.rewrite_implementation Ppx_entry.rewrite_signature
142-
| _ -> Bsc_args.bad_arg "Wrong format when use -as-ppx"
143-
else
144-
match rev_args with
145-
| [filename] -> process_file filename ppf
146-
| [] -> ()
147-
| _ ->
148-
if !Js_config.syntax_only then
149-
Ext_list.rev_iter rev_args (fun filename ->
150-
Clflags.reset_dump_state ();
151-
Warnings.reset ();
152-
process_file filename ppf)
153-
else Bsc_args.bad_arg "can not handle multiple files"
137+
match rev_args with
138+
| [filename] -> process_file filename ppf
139+
| [] -> ()
140+
| _ ->
141+
if !Js_config.syntax_only then
142+
Ext_list.rev_iter rev_args (fun filename ->
143+
Clflags.reset_dump_state ();
144+
Warnings.reset ();
145+
process_file filename ppf)
146+
else Bsc_args.bad_arg "can not handle multiple files"
154147

155148
let format_file input =
156149
let ext =
@@ -295,7 +288,6 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
295288
string_call Js_packages_state.set_package_map,
296289
"*internal* Set package map, not only set package name but also use it \
297290
as a namespace" );
298-
("-as-ppx", set Js_config.as_ppx, "*internal*As ppx for editor integration");
299291
( "-as-pp",
300292
unit_call (fun _ ->
301293
Js_config.as_pp := true;

compiler/common/js_config.ml

-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ let js_stdout = ref true
5656
let all_module_aliases = ref false
5757
let no_stdlib = ref false
5858
let no_export = ref false
59-
let as_ppx = ref false
60-
6159
let int_of_jsx_version = function
6260
| Jsx_v4 -> 4
6361

compiler/common/js_config.mli

-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ val no_stdlib : bool ref
9191

9292
val no_export : bool ref
9393

94-
val as_ppx : bool ref
95-
9694
val int_of_jsx_version : jsx_version -> int
9795

9896
val string_of_jsx_module : jsx_module -> string

compiler/frontend/ppx_apply.ml

-49
This file was deleted.

0 commit comments

Comments
 (0)