@@ -17334,7 +17334,7 @@ module Js_config : sig
17334
17334
* along with this program; if not, write to the Free Software
17335
17335
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
17336
17336
17337
- type jsx_version = Jsx_v3 | Jsx_v4 | NotSelected
17337
+ type jsx_version = Jsx_v3 | Jsx_v4
17338
17338
type jsx_module = React
17339
17339
type jsx_mode = Classic | Automatic
17340
17340
@@ -17389,7 +17389,7 @@ val force_cmi : bool ref
17389
17389
17390
17390
val force_cmj : bool ref
17391
17391
17392
- val jsx_version : jsx_version ref
17392
+ val jsx_version : jsx_version option ref
17393
17393
17394
17394
val jsx_module: jsx_module ref
17395
17395
@@ -17411,7 +17411,7 @@ val string_of_jsx_module : jsx_module -> string
17411
17411
17412
17412
val string_of_jsx_mode : jsx_mode -> string
17413
17413
17414
- val jsx_version_of_int : int -> jsx_version
17414
+ val jsx_version_of_int : int -> jsx_version option
17415
17415
17416
17416
val jsx_module_of_string : string -> jsx_module
17417
17417
@@ -17453,7 +17453,7 @@ end = struct
17453
17453
17454
17454
(** Browser is not set via command line only for internal use *)
17455
17455
17456
- type jsx_version = Jsx_v3 | Jsx_v4 | NotSelected
17456
+ type jsx_version = Jsx_v3 | Jsx_v4
17457
17457
type jsx_module = React
17458
17458
type jsx_mode = Classic | Automatic
17459
17459
@@ -17480,7 +17480,7 @@ let cmi_only = ref false
17480
17480
let cmj_only = ref false
17481
17481
let force_cmi = ref false
17482
17482
let force_cmj = ref false
17483
- let jsx_version = ref NotSelected
17483
+ let jsx_version = ref None
17484
17484
let jsx_module = ref React
17485
17485
let jsx_mode = ref Classic
17486
17486
let js_stdout = ref true
@@ -17492,7 +17492,6 @@ let as_ppx = ref false
17492
17492
let int_of_jsx_version = function
17493
17493
| Jsx_v3 -> 3
17494
17494
| Jsx_v4 -> 4
17495
- | NotSelected -> -1
17496
17495
17497
17496
let string_of_jsx_module = function
17498
17497
| React -> "react"
@@ -17502,9 +17501,9 @@ let string_of_jsx_mode = function
17502
17501
| Automatic -> "automatic"
17503
17502
17504
17503
let 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
17508
17507
17509
17508
let jsx_module_of_string = function
17510
17509
| "react" -> React
@@ -265941,10 +265940,10 @@ let rewrite_signature (ast : Parsetree.signature) : Parsetree.signature =
265941
265940
Ast_config.iter_on_bs_config_sigi ast;
265942
265941
let ast =
265943
265942
match !Js_config.jsx_version with
265944
- | NotSelected -> ast
265945
- | _ ->
265943
+ | None -> ast
265944
+ | Some jsxVersion ->
265946
265945
let open Js_config in
265947
- let jsxVersion = int_of_jsx_version !jsx_version in
265946
+ let jsxVersion = int_of_jsx_version jsxVersion in
265948
265947
let jsxModule = string_of_jsx_module !jsx_module in
265949
265948
let jsxMode = string_of_jsx_mode !jsx_mode in
265950
265949
Reactjs_jsx_ppx.rewrite_signature ~jsxVersion ~jsxModule ~jsxMode ast
@@ -265961,10 +265960,10 @@ let rewrite_implementation (ast : Parsetree.structure) : Parsetree.structure =
265961
265960
Ast_config.iter_on_bs_config_stru ast;
265962
265961
let ast =
265963
265962
match !Js_config.jsx_version with
265964
- | NotSelected -> ast
265965
- | _ ->
265963
+ | None -> ast
265964
+ | Some jsxVersion ->
265966
265965
let open Js_config in
265967
- let jsxVersion = int_of_jsx_version !jsx_version in
265966
+ let jsxVersion = int_of_jsx_version jsxVersion in
265968
265967
let jsxModule = string_of_jsx_module !jsx_module in
265969
265968
let jsxMode = string_of_jsx_mode !jsx_mode in
265970
265969
Reactjs_jsx_ppx.rewrite_implementation ~jsxVersion ~jsxModule ~jsxMode
@@ -294410,7 +294409,7 @@ module Compile = struct
294410
294409
let env = Res_compmisc.initial_env () in (* Question ?? *)
294411
294410
(* let finalenv = ref Env.empty in *)
294412
294411
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 *)
294414
294413
let ast = impl (str) in
294415
294414
let ast = Ppx_entry.rewrite_implementation ast in
294416
294415
let typed_tree =
0 commit comments