Skip to content

Commit 4fb1e06

Browse files
committed
snapshot
1 parent 0b6d1b4 commit 4fb1e06

File tree

3 files changed

+72
-30
lines changed

3 files changed

+72
-30
lines changed

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -410567,6 +410567,9 @@ let jsxMapper () =
410567410567
let fileName = filenameFromLoc pstr_loc in
410568410568
let emptyLoc = Location.in_file fileName in
410569410569
let mapBinding binding = if (hasAttrOnBinding binding) then
410570+
let bindingLoc = binding.pvb_loc in
410571+
let bindingPatLoc = binding.pvb_pat.ppat_loc in
410572+
let binding = { binding with pvb_pat = { binding.pvb_pat with ppat_loc = emptyLoc}; pvb_loc = emptyLoc} in
410570410573
let fnName = getFnName binding in
410571410574
let internalFnName = fnName ^ "$Internal" in
410572410575
let fullModuleName = makeModuleName fileName !nestedModules fnName in
@@ -410597,7 +410600,11 @@ let jsxMapper () =
410597410600
spelunkForFunExpression expression
410598410601
in
410599410602
let modifiedBinding binding =
410600-
let wrapExpressionWithBinding expressionFn expression = Vb.mk ~attrs:(List.filter otherAttrsPure binding.pvb_attributes) (Pat.var {loc = emptyLoc; txt = fnName}) (expressionFn expression) in
410603+
let wrapExpressionWithBinding expressionFn expression =
410604+
Vb.mk
410605+
~loc:bindingLoc
410606+
~attrs:(List.filter otherAttrsPure binding.pvb_attributes)
410607+
(Pat.var ~loc:bindingPatLoc {loc = bindingPatLoc; txt = fnName}) (expressionFn expression) in
410601410608
let expression = binding.pvb_expr in
410602410609
let unerasableIgnoreExp exp = { exp with pexp_attributes = (unerasableIgnore emptyLoc) :: exp.pexp_attributes } in
410603410610
(* TODO: there is a long-tail of unsupported features inside of blocks - Pexp_letmodule , Pexp_letexception , Pexp_ifthenelse *)
@@ -410829,11 +410836,11 @@ let jsxMapper () =
410829410836
| {loc; txt = Ldot (modulePath, ("createElement" | "make"))} ->
410830410837
(match !jsxVersion with
410831410838

410832-
# 922 "syntax/reactjs_jsx_ppx.cppo.ml"
410839+
# 929 "syntax/reactjs_jsx_ppx.cppo.ml"
410833410840
| None
410834410841
| Some 2 -> transformUppercaseCall modulePath mapper loc attrs callExpression callArguments
410835410842

410836-
# 928 "syntax/reactjs_jsx_ppx.cppo.ml"
410843+
# 935 "syntax/reactjs_jsx_ppx.cppo.ml"
410837410844
| Some 3 -> transformUppercaseCall3 modulePath mapper loc attrs callExpression callArguments
410838410845
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
410839410846

@@ -410843,11 +410850,11 @@ let jsxMapper () =
410843410850
| {loc; txt = Lident id} ->
410844410851
(match !jsxVersion with
410845410852

410846-
# 937 "syntax/reactjs_jsx_ppx.cppo.ml"
410853+
# 944 "syntax/reactjs_jsx_ppx.cppo.ml"
410847410854
| None
410848410855
| Some 2 -> transformLowercaseCall mapper loc attrs callArguments id
410849410856

410850-
# 943 "syntax/reactjs_jsx_ppx.cppo.ml"
410857+
# 950 "syntax/reactjs_jsx_ppx.cppo.ml"
410851410858
| Some 3 -> transformLowercaseCall3 mapper loc attrs callArguments id
410852410859
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
410853410860

@@ -411665,6 +411672,9 @@ let jsxMapper () =
411665411672
let fileName = filenameFromLoc pstr_loc in
411666411673
let emptyLoc = Location.in_file fileName in
411667411674
let mapBinding binding = if (hasAttrOnBinding binding) then
411675+
let bindingLoc = binding.pvb_loc in
411676+
let bindingPatLoc = binding.pvb_pat.ppat_loc in
411677+
let binding = { binding with pvb_pat = { binding.pvb_pat with ppat_loc = emptyLoc}; pvb_loc = emptyLoc} in
411668411678
let fnName = getFnName binding in
411669411679
let internalFnName = fnName ^ "$Internal" in
411670411680
let fullModuleName = makeModuleName fileName !nestedModules fnName in
@@ -411695,7 +411705,11 @@ let jsxMapper () =
411695411705
spelunkForFunExpression expression
411696411706
in
411697411707
let modifiedBinding binding =
411698-
let wrapExpressionWithBinding expressionFn expression = Vb.mk ~attrs:(List.filter otherAttrsPure binding.pvb_attributes) (Pat.var {loc = emptyLoc; txt = fnName}) (expressionFn expression) in
411708+
let wrapExpressionWithBinding expressionFn expression =
411709+
Vb.mk
411710+
~loc:bindingLoc
411711+
~attrs:(List.filter otherAttrsPure binding.pvb_attributes)
411712+
(Pat.var ~loc:bindingPatLoc {loc = bindingPatLoc; txt = fnName}) (expressionFn expression) in
411699411713
let expression = binding.pvb_expr in
411700411714
let unerasableIgnoreExp exp = { exp with pexp_attributes = (unerasableIgnore emptyLoc) :: exp.pexp_attributes } in
411701411715
(* TODO: there is a long-tail of unsupported features inside of blocks - Pexp_letmodule , Pexp_letexception , Pexp_ifthenelse *)
@@ -411927,11 +411941,11 @@ let jsxMapper () =
411927411941
| {loc; txt = Ldot (modulePath, ("createElement" | "make"))} ->
411928411942
(match !jsxVersion with
411929411943

411930-
# 925 "syntax/reactjs_jsx_ppx.cppo.ml"
411944+
# 932 "syntax/reactjs_jsx_ppx.cppo.ml"
411931411945
| Some 2 -> transformUppercaseCall modulePath mapper loc attrs callExpression callArguments
411932411946
| None
411933411947

411934-
# 928 "syntax/reactjs_jsx_ppx.cppo.ml"
411948+
# 935 "syntax/reactjs_jsx_ppx.cppo.ml"
411935411949
| Some 3 -> transformUppercaseCall3 modulePath mapper loc attrs callExpression callArguments
411936411950
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
411937411951

@@ -411941,11 +411955,11 @@ let jsxMapper () =
411941411955
| {loc; txt = Lident id} ->
411942411956
(match !jsxVersion with
411943411957

411944-
# 940 "syntax/reactjs_jsx_ppx.cppo.ml"
411958+
# 947 "syntax/reactjs_jsx_ppx.cppo.ml"
411945411959
| Some 2 -> transformLowercaseCall mapper loc attrs callArguments id
411946411960
| None
411947411961

411948-
# 943 "syntax/reactjs_jsx_ppx.cppo.ml"
411962+
# 950 "syntax/reactjs_jsx_ppx.cppo.ml"
411949411963
| Some 3 -> transformLowercaseCall3 mapper loc attrs callArguments id
411950411964
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
411951411965

lib/4.06.1/unstable/js_refmt_compiler.ml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -410567,6 +410567,9 @@ let jsxMapper () =
410567410567
let fileName = filenameFromLoc pstr_loc in
410568410568
let emptyLoc = Location.in_file fileName in
410569410569
let mapBinding binding = if (hasAttrOnBinding binding) then
410570+
let bindingLoc = binding.pvb_loc in
410571+
let bindingPatLoc = binding.pvb_pat.ppat_loc in
410572+
let binding = { binding with pvb_pat = { binding.pvb_pat with ppat_loc = emptyLoc}; pvb_loc = emptyLoc} in
410570410573
let fnName = getFnName binding in
410571410574
let internalFnName = fnName ^ "$Internal" in
410572410575
let fullModuleName = makeModuleName fileName !nestedModules fnName in
@@ -410597,7 +410600,11 @@ let jsxMapper () =
410597410600
spelunkForFunExpression expression
410598410601
in
410599410602
let modifiedBinding binding =
410600-
let wrapExpressionWithBinding expressionFn expression = Vb.mk ~attrs:(List.filter otherAttrsPure binding.pvb_attributes) (Pat.var {loc = emptyLoc; txt = fnName}) (expressionFn expression) in
410603+
let wrapExpressionWithBinding expressionFn expression =
410604+
Vb.mk
410605+
~loc:bindingLoc
410606+
~attrs:(List.filter otherAttrsPure binding.pvb_attributes)
410607+
(Pat.var ~loc:bindingPatLoc {loc = bindingPatLoc; txt = fnName}) (expressionFn expression) in
410601410608
let expression = binding.pvb_expr in
410602410609
let unerasableIgnoreExp exp = { exp with pexp_attributes = (unerasableIgnore emptyLoc) :: exp.pexp_attributes } in
410603410610
(* TODO: there is a long-tail of unsupported features inside of blocks - Pexp_letmodule , Pexp_letexception , Pexp_ifthenelse *)
@@ -410829,11 +410836,11 @@ let jsxMapper () =
410829410836
| {loc; txt = Ldot (modulePath, ("createElement" | "make"))} ->
410830410837
(match !jsxVersion with
410831410838

410832-
# 922 "syntax/reactjs_jsx_ppx.cppo.ml"
410839+
# 929 "syntax/reactjs_jsx_ppx.cppo.ml"
410833410840
| None
410834410841
| Some 2 -> transformUppercaseCall modulePath mapper loc attrs callExpression callArguments
410835410842

410836-
# 928 "syntax/reactjs_jsx_ppx.cppo.ml"
410843+
# 935 "syntax/reactjs_jsx_ppx.cppo.ml"
410837410844
| Some 3 -> transformUppercaseCall3 modulePath mapper loc attrs callExpression callArguments
410838410845
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
410839410846

@@ -410843,11 +410850,11 @@ let jsxMapper () =
410843410850
| {loc; txt = Lident id} ->
410844410851
(match !jsxVersion with
410845410852

410846-
# 937 "syntax/reactjs_jsx_ppx.cppo.ml"
410853+
# 944 "syntax/reactjs_jsx_ppx.cppo.ml"
410847410854
| None
410848410855
| Some 2 -> transformLowercaseCall mapper loc attrs callArguments id
410849410856

410850-
# 943 "syntax/reactjs_jsx_ppx.cppo.ml"
410857+
# 950 "syntax/reactjs_jsx_ppx.cppo.ml"
410851410858
| Some 3 -> transformLowercaseCall3 mapper loc attrs callArguments id
410852410859
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
410853410860

@@ -411665,6 +411672,9 @@ let jsxMapper () =
411665411672
let fileName = filenameFromLoc pstr_loc in
411666411673
let emptyLoc = Location.in_file fileName in
411667411674
let mapBinding binding = if (hasAttrOnBinding binding) then
411675+
let bindingLoc = binding.pvb_loc in
411676+
let bindingPatLoc = binding.pvb_pat.ppat_loc in
411677+
let binding = { binding with pvb_pat = { binding.pvb_pat with ppat_loc = emptyLoc}; pvb_loc = emptyLoc} in
411668411678
let fnName = getFnName binding in
411669411679
let internalFnName = fnName ^ "$Internal" in
411670411680
let fullModuleName = makeModuleName fileName !nestedModules fnName in
@@ -411695,7 +411705,11 @@ let jsxMapper () =
411695411705
spelunkForFunExpression expression
411696411706
in
411697411707
let modifiedBinding binding =
411698-
let wrapExpressionWithBinding expressionFn expression = Vb.mk ~attrs:(List.filter otherAttrsPure binding.pvb_attributes) (Pat.var {loc = emptyLoc; txt = fnName}) (expressionFn expression) in
411708+
let wrapExpressionWithBinding expressionFn expression =
411709+
Vb.mk
411710+
~loc:bindingLoc
411711+
~attrs:(List.filter otherAttrsPure binding.pvb_attributes)
411712+
(Pat.var ~loc:bindingPatLoc {loc = bindingPatLoc; txt = fnName}) (expressionFn expression) in
411699411713
let expression = binding.pvb_expr in
411700411714
let unerasableIgnoreExp exp = { exp with pexp_attributes = (unerasableIgnore emptyLoc) :: exp.pexp_attributes } in
411701411715
(* TODO: there is a long-tail of unsupported features inside of blocks - Pexp_letmodule , Pexp_letexception , Pexp_ifthenelse *)
@@ -411927,11 +411941,11 @@ let jsxMapper () =
411927411941
| {loc; txt = Ldot (modulePath, ("createElement" | "make"))} ->
411928411942
(match !jsxVersion with
411929411943

411930-
# 925 "syntax/reactjs_jsx_ppx.cppo.ml"
411944+
# 932 "syntax/reactjs_jsx_ppx.cppo.ml"
411931411945
| Some 2 -> transformUppercaseCall modulePath mapper loc attrs callExpression callArguments
411932411946
| None
411933411947

411934-
# 928 "syntax/reactjs_jsx_ppx.cppo.ml"
411948+
# 935 "syntax/reactjs_jsx_ppx.cppo.ml"
411935411949
| Some 3 -> transformUppercaseCall3 modulePath mapper loc attrs callExpression callArguments
411936411950
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
411937411951

@@ -411941,11 +411955,11 @@ let jsxMapper () =
411941411955
| {loc; txt = Lident id} ->
411942411956
(match !jsxVersion with
411943411957

411944-
# 940 "syntax/reactjs_jsx_ppx.cppo.ml"
411958+
# 947 "syntax/reactjs_jsx_ppx.cppo.ml"
411945411959
| Some 2 -> transformLowercaseCall mapper loc attrs callArguments id
411946411960
| None
411947411961

411948-
# 943 "syntax/reactjs_jsx_ppx.cppo.ml"
411962+
# 950 "syntax/reactjs_jsx_ppx.cppo.ml"
411949411963
| Some 3 -> transformLowercaseCall3 mapper loc attrs callArguments id
411950411964
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
411951411965

lib/4.06.1/whole_compiler.ml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -414306,6 +414306,9 @@ let jsxMapper () =
414306414306
let fileName = filenameFromLoc pstr_loc in
414307414307
let emptyLoc = Location.in_file fileName in
414308414308
let mapBinding binding = if (hasAttrOnBinding binding) then
414309+
let bindingLoc = binding.pvb_loc in
414310+
let bindingPatLoc = binding.pvb_pat.ppat_loc in
414311+
let binding = { binding with pvb_pat = { binding.pvb_pat with ppat_loc = emptyLoc}; pvb_loc = emptyLoc} in
414309414312
let fnName = getFnName binding in
414310414313
let internalFnName = fnName ^ "$Internal" in
414311414314
let fullModuleName = makeModuleName fileName !nestedModules fnName in
@@ -414336,7 +414339,11 @@ let jsxMapper () =
414336414339
spelunkForFunExpression expression
414337414340
in
414338414341
let modifiedBinding binding =
414339-
let wrapExpressionWithBinding expressionFn expression = Vb.mk ~attrs:(List.filter otherAttrsPure binding.pvb_attributes) (Pat.var {loc = emptyLoc; txt = fnName}) (expressionFn expression) in
414342+
let wrapExpressionWithBinding expressionFn expression =
414343+
Vb.mk
414344+
~loc:bindingLoc
414345+
~attrs:(List.filter otherAttrsPure binding.pvb_attributes)
414346+
(Pat.var ~loc:bindingPatLoc {loc = bindingPatLoc; txt = fnName}) (expressionFn expression) in
414340414347
let expression = binding.pvb_expr in
414341414348
let unerasableIgnoreExp exp = { exp with pexp_attributes = (unerasableIgnore emptyLoc) :: exp.pexp_attributes } in
414342414349
(* TODO: there is a long-tail of unsupported features inside of blocks - Pexp_letmodule , Pexp_letexception , Pexp_ifthenelse *)
@@ -414568,11 +414575,11 @@ let jsxMapper () =
414568414575
| {loc; txt = Ldot (modulePath, ("createElement" | "make"))} ->
414569414576
(match !jsxVersion with
414570414577

414571-
# 922 "syntax/reactjs_jsx_ppx.cppo.ml"
414578+
# 929 "syntax/reactjs_jsx_ppx.cppo.ml"
414572414579
| None
414573414580
| Some 2 -> transformUppercaseCall modulePath mapper loc attrs callExpression callArguments
414574414581

414575-
# 928 "syntax/reactjs_jsx_ppx.cppo.ml"
414582+
# 935 "syntax/reactjs_jsx_ppx.cppo.ml"
414576414583
| Some 3 -> transformUppercaseCall3 modulePath mapper loc attrs callExpression callArguments
414577414584
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
414578414585

@@ -414582,11 +414589,11 @@ let jsxMapper () =
414582414589
| {loc; txt = Lident id} ->
414583414590
(match !jsxVersion with
414584414591

414585-
# 937 "syntax/reactjs_jsx_ppx.cppo.ml"
414592+
# 944 "syntax/reactjs_jsx_ppx.cppo.ml"
414586414593
| None
414587414594
| Some 2 -> transformLowercaseCall mapper loc attrs callArguments id
414588414595

414589-
# 943 "syntax/reactjs_jsx_ppx.cppo.ml"
414596+
# 950 "syntax/reactjs_jsx_ppx.cppo.ml"
414590414597
| Some 3 -> transformLowercaseCall3 mapper loc attrs callArguments id
414591414598
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
414592414599

@@ -415404,6 +415411,9 @@ let jsxMapper () =
415404415411
let fileName = filenameFromLoc pstr_loc in
415405415412
let emptyLoc = Location.in_file fileName in
415406415413
let mapBinding binding = if (hasAttrOnBinding binding) then
415414+
let bindingLoc = binding.pvb_loc in
415415+
let bindingPatLoc = binding.pvb_pat.ppat_loc in
415416+
let binding = { binding with pvb_pat = { binding.pvb_pat with ppat_loc = emptyLoc}; pvb_loc = emptyLoc} in
415407415417
let fnName = getFnName binding in
415408415418
let internalFnName = fnName ^ "$Internal" in
415409415419
let fullModuleName = makeModuleName fileName !nestedModules fnName in
@@ -415434,7 +415444,11 @@ let jsxMapper () =
415434415444
spelunkForFunExpression expression
415435415445
in
415436415446
let modifiedBinding binding =
415437-
let wrapExpressionWithBinding expressionFn expression = Vb.mk ~attrs:(List.filter otherAttrsPure binding.pvb_attributes) (Pat.var {loc = emptyLoc; txt = fnName}) (expressionFn expression) in
415447+
let wrapExpressionWithBinding expressionFn expression =
415448+
Vb.mk
415449+
~loc:bindingLoc
415450+
~attrs:(List.filter otherAttrsPure binding.pvb_attributes)
415451+
(Pat.var ~loc:bindingPatLoc {loc = bindingPatLoc; txt = fnName}) (expressionFn expression) in
415438415452
let expression = binding.pvb_expr in
415439415453
let unerasableIgnoreExp exp = { exp with pexp_attributes = (unerasableIgnore emptyLoc) :: exp.pexp_attributes } in
415440415454
(* TODO: there is a long-tail of unsupported features inside of blocks - Pexp_letmodule , Pexp_letexception , Pexp_ifthenelse *)
@@ -415666,11 +415680,11 @@ let jsxMapper () =
415666415680
| {loc; txt = Ldot (modulePath, ("createElement" | "make"))} ->
415667415681
(match !jsxVersion with
415668415682

415669-
# 925 "syntax/reactjs_jsx_ppx.cppo.ml"
415683+
# 932 "syntax/reactjs_jsx_ppx.cppo.ml"
415670415684
| Some 2 -> transformUppercaseCall modulePath mapper loc attrs callExpression callArguments
415671415685
| None
415672415686

415673-
# 928 "syntax/reactjs_jsx_ppx.cppo.ml"
415687+
# 935 "syntax/reactjs_jsx_ppx.cppo.ml"
415674415688
| Some 3 -> transformUppercaseCall3 modulePath mapper loc attrs callExpression callArguments
415675415689
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
415676415690

@@ -415680,11 +415694,11 @@ let jsxMapper () =
415680415694
| {loc; txt = Lident id} ->
415681415695
(match !jsxVersion with
415682415696

415683-
# 940 "syntax/reactjs_jsx_ppx.cppo.ml"
415697+
# 947 "syntax/reactjs_jsx_ppx.cppo.ml"
415684415698
| Some 2 -> transformLowercaseCall mapper loc attrs callArguments id
415685415699
| None
415686415700

415687-
# 943 "syntax/reactjs_jsx_ppx.cppo.ml"
415701+
# 950 "syntax/reactjs_jsx_ppx.cppo.ml"
415688415702
| Some 3 -> transformLowercaseCall3 mapper loc attrs callArguments id
415689415703
| Some _ -> raise (Invalid_argument "JSX: the JSX version must be 2 or 3"))
415690415704

0 commit comments

Comments
 (0)