Skip to content

Commit bb0e6e3

Browse files
committed
Sync syntax: Clean up difference between v10 and v11 ppx so files are identical.
1 parent 3da4edd commit bb0e6e3

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273517,6 +273517,10 @@ let raiseErrorMultipleReactComponent ~loc =
273517273517
"Only one component definition is allowed for each module. Move to a \
273518273518
submodule or other file if necessary."
273519273519

273520+
let optionalAttr = ({txt = "ns.optional"; loc = Location.none}, PStr [])
273521+
let extractUncurried typ = typ
273522+
let removeArity binding = binding
273523+
273520273524
end
273521273525
module Reactjs_jsx_v3
273522273526
= struct
@@ -274743,8 +274747,7 @@ let getLabel str =
274743274747
| Optional str | Labelled str -> str
274744274748
| Nolabel -> ""
274745274749

274746-
let optionalAttr = ({txt = "ns.optional"; loc = Location.none}, PStr [])
274747-
let optionalAttrs = [optionalAttr]
274750+
let optionalAttrs = [React_jsx_common.optionalAttr]
274748274751

274749274752
let constantString ~loc str =
274750274753
Ast_helper.Exp.constant ~loc (Pconst_string (str, None))
@@ -275456,6 +275459,7 @@ let transformStructureItem ~config item =
275456275459
config.hasReactComponent <- true;
275457275460
check_string_int_attribute_iter.structure_item
275458275461
check_string_int_attribute_iter item;
275462+
let pval_type = React_jsx_common.extractUncurried pval_type in
275459275463
let coreTypeOfAttr = React_jsx_common.coreTypeOfAttrs pval_attributes in
275460275464
let typVarsOfCoreType =
275461275465
coreTypeOfAttr
@@ -275526,6 +275530,7 @@ let transformStructureItem ~config item =
275526275530
React_jsx_common.raiseErrorMultipleReactComponent ~loc:pstr_loc
275527275531
else (
275528275532
config.hasReactComponent <- true;
275533+
let binding = React_jsx_common.removeArity binding in
275529275534
let coreTypeOfAttr =
275530275535
React_jsx_common.coreTypeOfAttrs binding.pvb_attributes
275531275536
in

lib/4.06.1/unstable/js_playground_compiler.ml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273517,6 +273517,10 @@ let raiseErrorMultipleReactComponent ~loc =
273517273517
"Only one component definition is allowed for each module. Move to a \
273518273518
submodule or other file if necessary."
273519273519

273520+
let optionalAttr = ({txt = "ns.optional"; loc = Location.none}, PStr [])
273521+
let extractUncurried typ = typ
273522+
let removeArity binding = binding
273523+
273520273524
end
273521273525
module Reactjs_jsx_v3
273522273526
= struct
@@ -274743,8 +274747,7 @@ let getLabel str =
274743274747
| Optional str | Labelled str -> str
274744274748
| Nolabel -> ""
274745274749

274746-
let optionalAttr = ({txt = "ns.optional"; loc = Location.none}, PStr [])
274747-
let optionalAttrs = [optionalAttr]
274750+
let optionalAttrs = [React_jsx_common.optionalAttr]
274748274751

274749274752
let constantString ~loc str =
274750274753
Ast_helper.Exp.constant ~loc (Pconst_string (str, None))
@@ -275456,6 +275459,7 @@ let transformStructureItem ~config item =
275456275459
config.hasReactComponent <- true;
275457275460
check_string_int_attribute_iter.structure_item
275458275461
check_string_int_attribute_iter item;
275462+
let pval_type = React_jsx_common.extractUncurried pval_type in
275459275463
let coreTypeOfAttr = React_jsx_common.coreTypeOfAttrs pval_attributes in
275460275464
let typVarsOfCoreType =
275461275465
coreTypeOfAttr
@@ -275526,6 +275530,7 @@ let transformStructureItem ~config item =
275526275530
React_jsx_common.raiseErrorMultipleReactComponent ~loc:pstr_loc
275527275531
else (
275528275532
config.hasReactComponent <- true;
275533+
let binding = React_jsx_common.removeArity binding in
275529275534
let coreTypeOfAttr =
275530275535
React_jsx_common.coreTypeOfAttrs binding.pvb_attributes
275531275536
in

lib/4.06.1/whole_compiler.ml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283914,6 +283914,10 @@ let raiseErrorMultipleReactComponent ~loc =
283914283914
"Only one component definition is allowed for each module. Move to a \
283915283915
submodule or other file if necessary."
283916283916

283917+
let optionalAttr = ({txt = "ns.optional"; loc = Location.none}, PStr [])
283918+
let extractUncurried typ = typ
283919+
let removeArity binding = binding
283920+
283917283921
end
283918283922
module Reactjs_jsx_v3
283919283923
= struct
@@ -285140,8 +285144,7 @@ let getLabel str =
285140285144
| Optional str | Labelled str -> str
285141285145
| Nolabel -> ""
285142285146

285143-
let optionalAttr = ({txt = "ns.optional"; loc = Location.none}, PStr [])
285144-
let optionalAttrs = [optionalAttr]
285147+
let optionalAttrs = [React_jsx_common.optionalAttr]
285145285148

285146285149
let constantString ~loc str =
285147285150
Ast_helper.Exp.constant ~loc (Pconst_string (str, None))
@@ -285853,6 +285856,7 @@ let transformStructureItem ~config item =
285853285856
config.hasReactComponent <- true;
285854285857
check_string_int_attribute_iter.structure_item
285855285858
check_string_int_attribute_iter item;
285859+
let pval_type = React_jsx_common.extractUncurried pval_type in
285856285860
let coreTypeOfAttr = React_jsx_common.coreTypeOfAttrs pval_attributes in
285857285861
let typVarsOfCoreType =
285858285862
coreTypeOfAttr
@@ -285923,6 +285927,7 @@ let transformStructureItem ~config item =
285923285927
React_jsx_common.raiseErrorMultipleReactComponent ~loc:pstr_loc
285924285928
else (
285925285929
config.hasReactComponent <- true;
285930+
let binding = React_jsx_common.removeArity binding in
285926285931
let coreTypeOfAttr =
285927285932
React_jsx_common.coreTypeOfAttrs binding.pvb_attributes
285928285933
in

0 commit comments

Comments
 (0)