@@ -17334,7 +17334,7 @@ module Js_config : sig
1733417334 * along with this program; if not, write to the Free Software
1733517335 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
1733617336
17337- type jsx_version = Jsx_v3 | Jsx_v4 | NotSelected
17337+ type jsx_version = Jsx_v3 | Jsx_v4
1733817338type jsx_module = React
1733917339type jsx_mode = Classic | Automatic
1734017340
@@ -17389,7 +17389,7 @@ val force_cmi : bool ref
1738917389
1739017390val force_cmj : bool ref
1739117391
17392- val jsx_version : jsx_version ref
17392+ val jsx_version : jsx_version option ref
1739317393
1739417394val jsx_module: jsx_module ref
1739517395
@@ -17411,7 +17411,7 @@ val string_of_jsx_module : jsx_module -> string
1741117411
1741217412val string_of_jsx_mode : jsx_mode -> string
1741317413
17414- val jsx_version_of_int : int -> jsx_version
17414+ val jsx_version_of_int : int -> jsx_version option
1741517415
1741617416val jsx_module_of_string : string -> jsx_module
1741717417
@@ -17453,7 +17453,7 @@ end = struct
1745317453
1745417454(** Browser is not set via command line only for internal use *)
1745517455
17456- type jsx_version = Jsx_v3 | Jsx_v4 | NotSelected
17456+ type jsx_version = Jsx_v3 | Jsx_v4
1745717457type jsx_module = React
1745817458type jsx_mode = Classic | Automatic
1745917459
@@ -17480,7 +17480,7 @@ let cmi_only = ref false
1748017480let cmj_only = ref false
1748117481let force_cmi = ref false
1748217482let force_cmj = ref false
17483- let jsx_version = ref NotSelected
17483+ let jsx_version = ref None
1748417484let jsx_module = ref React
1748517485let jsx_mode = ref Classic
1748617486let js_stdout = ref true
@@ -17492,7 +17492,6 @@ let as_ppx = ref false
1749217492let int_of_jsx_version = function
1749317493| Jsx_v3 -> 3
1749417494| Jsx_v4 -> 4
17495- | NotSelected -> -1
1749617495
1749717496let string_of_jsx_module = function
1749817497| React -> "react"
@@ -17502,9 +17501,9 @@ let string_of_jsx_mode = function
1750217501| Automatic -> "automatic"
1750317502
1750417503let jsx_version_of_int = function
17505- | 3 -> Jsx_v3
17506- | 4 -> Jsx_v4
17507- | _ -> NotSelected
17504+ | 3 -> Some Jsx_v3
17505+ | 4 -> Some Jsx_v4
17506+ | _ -> None
1750817507
1750917508let jsx_module_of_string = function
1751017509| "react" -> React
@@ -265941,10 +265940,10 @@ let rewrite_signature (ast : Parsetree.signature) : Parsetree.signature =
265941265940 Ast_config.iter_on_bs_config_sigi ast;
265942265941 let ast =
265943265942 match !Js_config.jsx_version with
265944- | NotSelected -> ast
265945- | _ ->
265943+ | None -> ast
265944+ | Some jsxVersion ->
265946265945 let open Js_config in
265947- let jsxVersion = int_of_jsx_version !jsx_version in
265946+ let jsxVersion = int_of_jsx_version jsxVersion in
265948265947 let jsxModule = string_of_jsx_module !jsx_module in
265949265948 let jsxMode = string_of_jsx_mode !jsx_mode in
265950265949 Reactjs_jsx_ppx.rewrite_signature ~jsxVersion ~jsxModule ~jsxMode ast
@@ -265961,10 +265960,10 @@ let rewrite_implementation (ast : Parsetree.structure) : Parsetree.structure =
265961265960 Ast_config.iter_on_bs_config_stru ast;
265962265961 let ast =
265963265962 match !Js_config.jsx_version with
265964- | NotSelected -> ast
265965- | _ ->
265963+ | None -> ast
265964+ | Some jsxVersion ->
265966265965 let open Js_config in
265967- let jsxVersion = int_of_jsx_version !jsx_version in
265966+ let jsxVersion = int_of_jsx_version jsxVersion in
265968265967 let jsxModule = string_of_jsx_module !jsx_module in
265969265968 let jsxMode = string_of_jsx_mode !jsx_mode in
265970265969 Reactjs_jsx_ppx.rewrite_implementation ~jsxVersion ~jsxModule ~jsxMode
@@ -294410,7 +294409,7 @@ module Compile = struct
294410294409 let env = Res_compmisc.initial_env () in (* Question ?? *)
294411294410 (* let finalenv = ref Env.empty in *)
294412294411 let types_signature = ref [] in
294413- Js_config.jsx_version := Js_config.Jsx_v3; (* default *)
294412+ Js_config.jsx_version := Some Js_config.Jsx_v3; (* default *)
294414294413 let ast = impl (str) in
294415294414 let ast = Ppx_entry.rewrite_implementation ast in
294416294415 let typed_tree =
0 commit comments