Skip to content

Commit 46a1fcf

Browse files
mununkicristianoc
andauthored
Sync latest syntax (#5884)
* sync latest syntax * changelog * Update CHANGELOG.md Co-authored-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
1 parent 857e767 commit 46a1fcf

File tree

6 files changed

+10
-15
lines changed

6 files changed

+10
-15
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
- Prevent inlining of async functions in additional cases https://github.com/rescript-lang/rescript-compiler/issues/5860
1818
- Revert to ubuntu-18.04 in CI to support Linux versions with older glibc https://github.com/rescript-lang/rescript-compiler/issues/5868
19+
- Fix build error where aliasing arguments to `_` in the make function with JSX V4. https://github.com/rescript-lang/syntax/pull/720
20+
- Fix parsing of spread props as an expression in JSX V4 https://github.com/rescript-lang/syntax/pull/721
1921

2022
# 10.1.0
2123

jscomp/napkin/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
- Fix issue where the JSX fragment without children build error https://github.com/rescript-lang/syntax/pull/704
5252
- Fix issue where async as an id cannot be used with application and labelled arguments https://github.com/rescript-lang/syntax/issues/707
5353
- Treat await as almost-unary operator weaker than pipe so `await foo->bar` means `await (foo->bar)` https://github.com/rescript-lang/syntax/pull/711
54+
- Fix build error where aliasing arguments to `_` in the make function with JSX V4. https://github.com/rescript-lang/syntax/pull/720
55+
- Fix parsing of spread props as an expression in JSX V4 https://github.com/rescript-lang/syntax/pull/721
5456

5557
#### :eyeglasses: Spec Compliance
5658

lib/4.06.1/unstable/js_compiler.ml

+1-4
Original file line numberDiff line numberDiff line change
@@ -275780,10 +275780,7 @@ let transformStructureItem ~config mapper item =
275780275780
| Pexp_fun
275781275781
( _arg_label,
275782275782
_default,
275783-
{
275784-
ppat_desc =
275785-
Ppat_construct ({txt = Lident "()"}, _) | Ppat_any;
275786-
},
275783+
{ppat_desc = Ppat_construct ({txt = Lident "()"}, _)},
275787275784
expr ) ->
275788275785
(patternsWithLabel, patternsWithNolabel, expr)
275789275786
| Pexp_fun

lib/4.06.1/unstable/js_playground_compiler.ml

+2-5
Original file line numberDiff line numberDiff line change
@@ -275780,10 +275780,7 @@ let transformStructureItem ~config mapper item =
275780275780
| Pexp_fun
275781275781
( _arg_label,
275782275782
_default,
275783-
{
275784-
ppat_desc =
275785-
Ppat_construct ({txt = Lident "()"}, _) | Ppat_any;
275786-
},
275783+
{ppat_desc = Ppat_construct ({txt = Lident "()"}, _)},
275787275784
expr ) ->
275788275785
(patternsWithLabel, patternsWithNolabel, expr)
275789275786
| Pexp_fun
@@ -285935,7 +285932,7 @@ and parseJsxProp p =
285935285932
(Location.mkloc "ns.namedArgLoc" loc, Parsetree.PStr [])
285936285933
in
285937285934
let attrExpr =
285938-
let e = parsePrimaryExpr ~operand:(parseAtomicExpr p) p in
285935+
let e = parsePrimaryExpr ~operand:(parseExpr p) p in
285939285936
{e with pexp_attributes = propLocAttr :: e.pexp_attributes}
285940285937
in
285941285938
(* using label "spreadProps" to distinguish from others *)

lib/4.06.1/whole_compiler.ml

+2-5
Original file line numberDiff line numberDiff line change
@@ -286164,10 +286164,7 @@ let transformStructureItem ~config mapper item =
286164286164
| Pexp_fun
286165286165
( _arg_label,
286166286166
_default,
286167-
{
286168-
ppat_desc =
286169-
Ppat_construct ({txt = Lident "()"}, _) | Ppat_any;
286170-
},
286167+
{ppat_desc = Ppat_construct ({txt = Lident "()"}, _)},
286171286168
expr ) ->
286172286169
(patternsWithLabel, patternsWithNolabel, expr)
286173286170
| Pexp_fun
@@ -299467,7 +299464,7 @@ and parseJsxProp p =
299467299464
(Location.mkloc "ns.namedArgLoc" loc, Parsetree.PStr [])
299468299465
in
299469299466
let attrExpr =
299470-
let e = parsePrimaryExpr ~operand:(parseAtomicExpr p) p in
299467+
let e = parsePrimaryExpr ~operand:(parseExpr p) p in
299471299468
{e with pexp_attributes = propLocAttr :: e.pexp_attributes}
299472299469
in
299473299470
(* using label "spreadProps" to distinguish from others *)

0 commit comments

Comments
 (0)