@@ -17338,7 +17338,7 @@ module Js_config : sig
1733817338 * along with this program; if not, write to the Free Software
1733917339 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
1734017340
17341- type jsx_version = Jsx_v3 | Jsx_v4 | NotSelected
17341+ type jsx_version = Jsx_v3 | Jsx_v4
1734217342type jsx_module = React
1734317343type jsx_mode = Classic | Automatic
1734417344
@@ -17393,7 +17393,7 @@ val force_cmi : bool ref
1739317393
1739417394val force_cmj : bool ref
1739517395
17396- val jsx_version : jsx_version ref
17396+ val jsx_version : jsx_version option ref
1739717397
1739817398val jsx_module: jsx_module ref
1739917399
@@ -17415,7 +17415,7 @@ val string_of_jsx_module : jsx_module -> string
1741517415
1741617416val string_of_jsx_mode : jsx_mode -> string
1741717417
17418- val jsx_version_of_int : int -> jsx_version
17418+ val jsx_version_of_int : int -> jsx_version option
1741917419
1742017420val jsx_module_of_string : string -> jsx_module
1742117421
@@ -17457,7 +17457,7 @@ end = struct
1745717457
1745817458(** Browser is not set via command line only for internal use *)
1745917459
17460- type jsx_version = Jsx_v3 | Jsx_v4 | NotSelected
17460+ type jsx_version = Jsx_v3 | Jsx_v4
1746117461type jsx_module = React
1746217462type jsx_mode = Classic | Automatic
1746317463
@@ -17484,7 +17484,7 @@ let cmi_only = ref false
1748417484let cmj_only = ref false
1748517485let force_cmi = ref false
1748617486let force_cmj = ref false
17487- let jsx_version = ref NotSelected
17487+ let jsx_version = ref None
1748817488let jsx_module = ref React
1748917489let jsx_mode = ref Classic
1749017490let js_stdout = ref true
@@ -17496,7 +17496,6 @@ let as_ppx = ref false
1749617496let int_of_jsx_version = function
1749717497| Jsx_v3 -> 3
1749817498| Jsx_v4 -> 4
17499- | NotSelected -> -1
1750017499
1750117500let string_of_jsx_module = function
1750217501| React -> "react"
@@ -17506,9 +17505,9 @@ let string_of_jsx_mode = function
1750617505| Automatic -> "automatic"
1750717506
1750817507let jsx_version_of_int = function
17509- | 3 -> Jsx_v3
17510- | 4 -> Jsx_v4
17511- | _ -> NotSelected
17508+ | 3 -> Some Jsx_v3
17509+ | 4 -> Some Jsx_v4
17510+ | _ -> None
1751217511
1751317512let jsx_module_of_string = function
1751417513| "react" -> React
@@ -275714,10 +275713,10 @@ let rewrite_signature (ast : Parsetree.signature) : Parsetree.signature =
275714275713 Ast_config.iter_on_bs_config_sigi ast;
275715275714 let ast =
275716275715 match !Js_config.jsx_version with
275717- | NotSelected -> ast
275718- | _ ->
275716+ | None -> ast
275717+ | Some jsxVersion ->
275719275718 let open Js_config in
275720- let jsxVersion = int_of_jsx_version !jsx_version in
275719+ let jsxVersion = int_of_jsx_version jsxVersion in
275721275720 let jsxModule = string_of_jsx_module !jsx_module in
275722275721 let jsxMode = string_of_jsx_mode !jsx_mode in
275723275722 Reactjs_jsx_ppx.rewrite_signature ~jsxVersion ~jsxModule ~jsxMode ast
@@ -275734,10 +275733,10 @@ let rewrite_implementation (ast : Parsetree.structure) : Parsetree.structure =
275734275733 Ast_config.iter_on_bs_config_stru ast;
275735275734 let ast =
275736275735 match !Js_config.jsx_version with
275737- | NotSelected -> ast
275738- | _ ->
275736+ | None -> ast
275737+ | Some jsxVersion ->
275739275738 let open Js_config in
275740- let jsxVersion = int_of_jsx_version !jsx_version in
275739+ let jsxVersion = int_of_jsx_version jsxVersion in
275741275740 let jsxModule = string_of_jsx_module !jsx_module in
275742275741 let jsxMode = string_of_jsx_mode !jsx_mode in
275743275742 Reactjs_jsx_ppx.rewrite_implementation ~jsxVersion ~jsxModule ~jsxMode
@@ -294368,7 +294367,7 @@ module Compile = struct
294368294367 let env = Res_compmisc.initial_env () in (* Question ?? *)
294369294368 (* let finalenv = ref Env.empty in *)
294370294369 let types_signature = ref [] in
294371- Js_config.jsx_version := Js_config.Jsx_v3; (* default *)
294370+ Js_config.jsx_version := Some Js_config.Jsx_v3; (* default *)
294372294371 let ast = impl (str) in
294373294372 let ast = Ppx_entry.rewrite_implementation ast in
294374294373 let typed_tree =
0 commit comments