@@ -41369,9 +41369,11 @@ let jsxMapper () =
41369
41369
41370
41370
# 671 "syntax/reactjs_jsx_ppx.cppo.ml"
41371
41371
| Ptyp_arrow ("", _type, rest) ->
41372
-
41372
+
41373
41373
# 673 "syntax/reactjs_jsx_ppx.cppo.ml"
41374
- getPropTypes types rest
41374
+ getPropTypes types rest
41375
+
41376
+ # 681 "syntax/reactjs_jsx_ppx.cppo.ml"
41375
41377
| Ptyp_arrow (name, type_, returnValue) when isLabelled name || isOptional name ->
41376
41378
(returnValue, (name, returnValue.ptyp_loc, type_)::types)
41377
41379
| _ -> (fullType, types))
@@ -41432,10 +41434,10 @@ let jsxMapper () =
41432
41434
((fun expressionDesc -> {expression with pexp_desc = Pexp_let (recursive, vbs, wrapExpression expressionDesc)}), realReturnExpression)
41433
41435
(* let make = React.forwardRef((~prop) => ...) *)
41434
41436
41435
- # 736 "syntax/reactjs_jsx_ppx.cppo.ml"
41437
+ # 743 "syntax/reactjs_jsx_ppx.cppo.ml"
41436
41438
| { pexp_desc = Pexp_apply (wrapperExpression, [("", innerFunctionExpression)]) } ->
41437
41439
41438
- # 738 "syntax/reactjs_jsx_ppx.cppo.ml"
41440
+ # 745 "syntax/reactjs_jsx_ppx.cppo.ml"
41439
41441
let (wrapExpression, realReturnExpression) = spelunkForFunExpression innerFunctionExpression in
41440
41442
((fun expressionDesc -> {
41441
41443
expression with pexp_desc =
@@ -41578,10 +41580,10 @@ let jsxMapper () =
41578
41580
| Ptyp_arrow (name, type_, ({ptyp_desc = Ptyp_arrow _} as rest)) when isOptional name || isLabelled name ->
41579
41581
getPropTypes ((name, ptyp_loc, type_)::types) rest
41580
41582
41581
- # 882 "syntax/reactjs_jsx_ppx.cppo.ml"
41583
+ # 889 "syntax/reactjs_jsx_ppx.cppo.ml"
41582
41584
| Ptyp_arrow ("", _type, rest) ->
41583
41585
41584
- # 884 "syntax/reactjs_jsx_ppx.cppo.ml"
41586
+ # 891 "syntax/reactjs_jsx_ppx.cppo.ml"
41585
41587
getPropTypes types rest
41586
41588
| Ptyp_arrow (name, type_, returnValue) when isOptional name || isLabelled name ->
41587
41589
(returnValue, (name, returnValue.ptyp_loc, type_)::types)
@@ -41629,11 +41631,11 @@ let jsxMapper () =
41629
41631
| {loc; txt = Ldot (modulePath, ("createElement" | "make"))} ->
41630
41632
(match !jsxVersion with
41631
41633
41632
- # 931 "syntax/reactjs_jsx_ppx.cppo.ml"
41634
+ # 938 "syntax/reactjs_jsx_ppx.cppo.ml"
41633
41635
| None
41634
41636
| Some 2 -> transformUppercaseCall modulePath mapper loc attrs callExpression callArguments
41635
41637
41636
- # 937 "syntax/reactjs_jsx_ppx.cppo.ml"
41638
+ # 944 "syntax/reactjs_jsx_ppx.cppo.ml"
41637
41639
| Some 3 -> transformUppercaseCall3 modulePath mapper loc attrs callExpression callArguments
41638
41640
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
41639
41641
@@ -41643,11 +41645,11 @@ let jsxMapper () =
41643
41645
| {loc; txt = Lident id} ->
41644
41646
(match !jsxVersion with
41645
41647
41646
- # 946 "syntax/reactjs_jsx_ppx.cppo.ml"
41648
+ # 953 "syntax/reactjs_jsx_ppx.cppo.ml"
41647
41649
| None
41648
41650
| Some 2 -> transformLowercaseCall mapper loc attrs callArguments id
41649
41651
41650
- # 952 "syntax/reactjs_jsx_ppx.cppo.ml"
41652
+ # 959 "syntax/reactjs_jsx_ppx.cppo.ml"
41651
41653
| Some 3 -> transformLowercaseCall3 mapper loc attrs callArguments id
41652
41654
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
41653
41655
@@ -41704,17 +41706,17 @@ let jsxMapper () =
41704
41706
| ([], _) -> default_mapper.structure mapper structure
41705
41707
(* {jsx: 2} *)
41706
41708
41707
- # 1010 "syntax/reactjs_jsx_ppx.cppo.ml"
41709
+ # 1017 "syntax/reactjs_jsx_ppx.cppo.ml"
41708
41710
| ((_, {pexp_desc = Pexp_constant (Const_int version)})::_rest, recordFieldsWithoutJsx) -> begin
41709
41711
41710
- # 1012 "syntax/reactjs_jsx_ppx.cppo.ml"
41712
+ # 1019 "syntax/reactjs_jsx_ppx.cppo.ml"
41711
41713
(match version with
41712
41714
41713
- # 1017 "syntax/reactjs_jsx_ppx.cppo.ml"
41715
+ # 1024 "syntax/reactjs_jsx_ppx.cppo.ml"
41714
41716
| 2 -> jsxVersion := Some 2
41715
41717
| 3 -> jsxVersion := Some 3
41716
41718
41717
- # 1020 "syntax/reactjs_jsx_ppx.cppo.ml"
41719
+ # 1027 "syntax/reactjs_jsx_ppx.cppo.ml"
41718
41720
| _ -> raise (Invalid_argument "JSX: the file-level bs.config's jsx version must be 2 or 3"));
41719
41721
match recordFieldsWithoutJsx with
41720
41722
(* record empty now, remove the whole bs.config attribute *)
@@ -42428,9 +42430,11 @@ let jsxMapper () =
42428
42430
42429
42431
# 671 "syntax/reactjs_jsx_ppx.cppo.ml"
42430
42432
| Ptyp_arrow ("", _type, rest) ->
42431
-
42433
+
42432
42434
# 673 "syntax/reactjs_jsx_ppx.cppo.ml"
42433
- getPropTypes types rest
42435
+ getPropTypes types rest
42436
+
42437
+ # 681 "syntax/reactjs_jsx_ppx.cppo.ml"
42434
42438
| Ptyp_arrow (name, type_, returnValue) when isLabelled name || isOptional name ->
42435
42439
(returnValue, (name, returnValue.ptyp_loc, type_)::types)
42436
42440
| _ -> (fullType, types))
@@ -42491,10 +42495,10 @@ let jsxMapper () =
42491
42495
((fun expressionDesc -> {expression with pexp_desc = Pexp_let (recursive, vbs, wrapExpression expressionDesc)}), realReturnExpression)
42492
42496
(* let make = React.forwardRef((~prop) => ...) *)
42493
42497
42494
- # 736 "syntax/reactjs_jsx_ppx.cppo.ml"
42498
+ # 743 "syntax/reactjs_jsx_ppx.cppo.ml"
42495
42499
| { pexp_desc = Pexp_apply (wrapperExpression, [("", innerFunctionExpression)]) } ->
42496
42500
42497
- # 738 "syntax/reactjs_jsx_ppx.cppo.ml"
42501
+ # 745 "syntax/reactjs_jsx_ppx.cppo.ml"
42498
42502
let (wrapExpression, realReturnExpression) = spelunkForFunExpression innerFunctionExpression in
42499
42503
((fun expressionDesc -> {
42500
42504
expression with pexp_desc =
@@ -42637,10 +42641,10 @@ let jsxMapper () =
42637
42641
| Ptyp_arrow (name, type_, ({ptyp_desc = Ptyp_arrow _} as rest)) when isOptional name || isLabelled name ->
42638
42642
getPropTypes ((name, ptyp_loc, type_)::types) rest
42639
42643
42640
- # 882 "syntax/reactjs_jsx_ppx.cppo.ml"
42644
+ # 889 "syntax/reactjs_jsx_ppx.cppo.ml"
42641
42645
| Ptyp_arrow ("", _type, rest) ->
42642
42646
42643
- # 884 "syntax/reactjs_jsx_ppx.cppo.ml"
42647
+ # 891 "syntax/reactjs_jsx_ppx.cppo.ml"
42644
42648
getPropTypes types rest
42645
42649
| Ptyp_arrow (name, type_, returnValue) when isOptional name || isLabelled name ->
42646
42650
(returnValue, (name, returnValue.ptyp_loc, type_)::types)
@@ -42688,11 +42692,11 @@ let jsxMapper () =
42688
42692
| {loc; txt = Ldot (modulePath, ("createElement" | "make"))} ->
42689
42693
(match !jsxVersion with
42690
42694
42691
- # 934 "syntax/reactjs_jsx_ppx.cppo.ml"
42695
+ # 941 "syntax/reactjs_jsx_ppx.cppo.ml"
42692
42696
| Some 2 -> transformUppercaseCall modulePath mapper loc attrs callExpression callArguments
42693
42697
| None
42694
42698
42695
- # 937 "syntax/reactjs_jsx_ppx.cppo.ml"
42699
+ # 944 "syntax/reactjs_jsx_ppx.cppo.ml"
42696
42700
| Some 3 -> transformUppercaseCall3 modulePath mapper loc attrs callExpression callArguments
42697
42701
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
42698
42702
@@ -42702,11 +42706,11 @@ let jsxMapper () =
42702
42706
| {loc; txt = Lident id} ->
42703
42707
(match !jsxVersion with
42704
42708
42705
- # 949 "syntax/reactjs_jsx_ppx.cppo.ml"
42709
+ # 956 "syntax/reactjs_jsx_ppx.cppo.ml"
42706
42710
| Some 2 -> transformLowercaseCall mapper loc attrs callArguments id
42707
42711
| None
42708
42712
42709
- # 952 "syntax/reactjs_jsx_ppx.cppo.ml"
42713
+ # 959 "syntax/reactjs_jsx_ppx.cppo.ml"
42710
42714
| Some 3 -> transformLowercaseCall3 mapper loc attrs callArguments id
42711
42715
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
42712
42716
@@ -42763,17 +42767,17 @@ let jsxMapper () =
42763
42767
| ([], _) -> default_mapper.structure mapper structure
42764
42768
(* {jsx: 2} *)
42765
42769
42766
- # 1010 "syntax/reactjs_jsx_ppx.cppo.ml"
42770
+ # 1017 "syntax/reactjs_jsx_ppx.cppo.ml"
42767
42771
| ((_, {pexp_desc = Pexp_constant (Const_int version)})::_rest, recordFieldsWithoutJsx) -> begin
42768
42772
42769
- # 1012 "syntax/reactjs_jsx_ppx.cppo.ml"
42773
+ # 1019 "syntax/reactjs_jsx_ppx.cppo.ml"
42770
42774
(match version with
42771
42775
42772
- # 1017 "syntax/reactjs_jsx_ppx.cppo.ml"
42776
+ # 1024 "syntax/reactjs_jsx_ppx.cppo.ml"
42773
42777
| 2 -> jsxVersion := Some 2
42774
42778
| 3 -> jsxVersion := Some 3
42775
42779
42776
- # 1020 "syntax/reactjs_jsx_ppx.cppo.ml"
42780
+ # 1027 "syntax/reactjs_jsx_ppx.cppo.ml"
42777
42781
| _ -> raise (Invalid_argument "JSX: the file-level bs.config's jsx version must be 2 or 3"));
42778
42782
match recordFieldsWithoutJsx with
42779
42783
(* record empty now, remove the whole bs.config attribute *)
0 commit comments