Skip to content

Commit 709ead4

Browse files
committed
sync latest syntax
1 parent 60b0460 commit 709ead4

File tree

6 files changed

+48
-28
lines changed

6 files changed

+48
-28
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- Fix issue with nested async functions, where the inner function would be emitted without `async` https://github.com/rescript-lang/rescript-compiler/pull/5984
2323
- Fix issue with printing async functions with locally abstract types https://github.com/rescript-lang/syntax/pull/732
2424
- Fix issue with async context and locally abstract types https://github.com/rescript-lang/rescript-compiler/pull/5985
25+
- Fix support for recursive components in JSX V4 https://github.com/rescript-lang/syntax/pull/733
2526

2627
# 10.1.2
2728

jscomp/napkin/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
- Fix issue where error messages related to non-existent props were displayed without location information https://github.com/rescript-lang/syntax/pull/730
6060
- Fix issue where uncurried functions were incorrectly converting the type of a prop given as a default value to curried https://github.com/rescript-lang/syntax/pull/731
6161
- Fix issue with printing async functions with locally abstract types https://github.com/rescript-lang/syntax/pull/732
62+
- Fix support for recursive components in JSX V4 https://github.com/rescript-lang/syntax/pull/733
6263

6364
#### :eyeglasses: Spec Compliance
6465

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -275738,7 +275738,12 @@ let transformStructureItem ~config mapper item =
275738275738
in
275739275739
let innerExpression =
275740275740
Exp.apply
275741-
(Exp.ident (Location.mknoloc @@ Lident fnName))
275741+
(Exp.ident
275742+
(Location.mknoloc
275743+
@@ Lident
275744+
(match recFlag with
275745+
| Recursive -> internalFnName
275746+
| Nonrecursive -> fnName)))
275742275747
([(Nolabel, Exp.ident (Location.mknoloc @@ Lident "props"))]
275743275748
@
275744275749
match hasForwardRef with
@@ -275880,14 +275885,15 @@ let transformStructureItem ~config mapper item =
275880275885
| Recursive ->
275881275886
( [
275882275887
bindingWrapper
275883-
(Exp.let_ ~loc:emptyLoc Recursive
275884-
[
275885-
makeNewBinding binding expression internalFnName;
275886-
Vb.mk
275887-
(Pat.var {loc = emptyLoc; txt = fnName})
275888-
fullExpression;
275889-
]
275890-
(Exp.ident {loc = emptyLoc; txt = Lident fnName}));
275888+
(Exp.let_ ~loc:emptyLoc Nonrecursive
275889+
[makeNewBinding binding expression internalFnName]
275890+
(Exp.let_ ~loc:emptyLoc Nonrecursive
275891+
[
275892+
Vb.mk
275893+
(Pat.var {loc = emptyLoc; txt = fnName})
275894+
fullExpression;
275895+
]
275896+
(Exp.ident {loc = emptyLoc; txt = Lident fnName})));
275891275897
],
275892275898
None )
275893275899
| Nonrecursive ->

lib/4.06.1/unstable/js_playground_compiler.ml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -275738,7 +275738,12 @@ let transformStructureItem ~config mapper item =
275738275738
in
275739275739
let innerExpression =
275740275740
Exp.apply
275741-
(Exp.ident (Location.mknoloc @@ Lident fnName))
275741+
(Exp.ident
275742+
(Location.mknoloc
275743+
@@ Lident
275744+
(match recFlag with
275745+
| Recursive -> internalFnName
275746+
| Nonrecursive -> fnName)))
275742275747
([(Nolabel, Exp.ident (Location.mknoloc @@ Lident "props"))]
275743275748
@
275744275749
match hasForwardRef with
@@ -275880,14 +275885,15 @@ let transformStructureItem ~config mapper item =
275880275885
| Recursive ->
275881275886
( [
275882275887
bindingWrapper
275883-
(Exp.let_ ~loc:emptyLoc Recursive
275884-
[
275885-
makeNewBinding binding expression internalFnName;
275886-
Vb.mk
275887-
(Pat.var {loc = emptyLoc; txt = fnName})
275888-
fullExpression;
275889-
]
275890-
(Exp.ident {loc = emptyLoc; txt = Lident fnName}));
275888+
(Exp.let_ ~loc:emptyLoc Nonrecursive
275889+
[makeNewBinding binding expression internalFnName]
275890+
(Exp.let_ ~loc:emptyLoc Nonrecursive
275891+
[
275892+
Vb.mk
275893+
(Pat.var {loc = emptyLoc; txt = fnName})
275894+
fullExpression;
275895+
]
275896+
(Exp.ident {loc = emptyLoc; txt = Lident fnName})));
275891275897
],
275892275898
None )
275893275899
| Nonrecursive ->

lib/4.06.1/whole_compiler.ml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -286122,7 +286122,12 @@ let transformStructureItem ~config mapper item =
286122286122
in
286123286123
let innerExpression =
286124286124
Exp.apply
286125-
(Exp.ident (Location.mknoloc @@ Lident fnName))
286125+
(Exp.ident
286126+
(Location.mknoloc
286127+
@@ Lident
286128+
(match recFlag with
286129+
| Recursive -> internalFnName
286130+
| Nonrecursive -> fnName)))
286126286131
([(Nolabel, Exp.ident (Location.mknoloc @@ Lident "props"))]
286127286132
@
286128286133
match hasForwardRef with
@@ -286264,14 +286269,15 @@ let transformStructureItem ~config mapper item =
286264286269
| Recursive ->
286265286270
( [
286266286271
bindingWrapper
286267-
(Exp.let_ ~loc:emptyLoc Recursive
286268-
[
286269-
makeNewBinding binding expression internalFnName;
286270-
Vb.mk
286271-
(Pat.var {loc = emptyLoc; txt = fnName})
286272-
fullExpression;
286273-
]
286274-
(Exp.ident {loc = emptyLoc; txt = Lident fnName}));
286272+
(Exp.let_ ~loc:emptyLoc Nonrecursive
286273+
[makeNewBinding binding expression internalFnName]
286274+
(Exp.let_ ~loc:emptyLoc Nonrecursive
286275+
[
286276+
Vb.mk
286277+
(Pat.var {loc = emptyLoc; txt = fnName})
286278+
fullExpression;
286279+
]
286280+
(Exp.ident {loc = emptyLoc; txt = Lident fnName})));
286275286281
],
286276286282
None )
286277286283
| Nonrecursive ->

0 commit comments

Comments
 (0)