Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit a59938f

Browse files
committed
Fir reformatting issue for -> and |>.
1 parent f02c470 commit a59938f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
- Initial support for JSX V4, still work in progress.
1818
- :boom: when V4 is activated, at most one component is allowed for each module.
1919

20+
#### :bug: Bug Fix
21+
22+
- Fix issue where the printer would omit attributes for `->` and `|>` https://github.com/rescript-lang/syntax/pull/629
23+
2024
## ReScript 10.0
2125

2226
- Fix printing for inline nullary functor types [#477](https://github.com/rescript-lang/syntax/pull/477)

src/res_printer.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3658,6 +3658,7 @@ and printBinaryExpression ~customLayout (expr : Parsetree.expression) cmtTbl =
36583658
Doc.group
36593659
(Doc.concat
36603660
[
3661+
printAttributes ~customLayout expr.pexp_attributes cmtTbl;
36613662
lhsDoc;
36623663
(match (lhsHasCommentBelow, op) with
36633664
| true, "|." -> Doc.concat [Doc.softLine; Doc.text "->"]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
let s1 = x->foo
1+
let s1 = @ann x->foo
22
let s2 = @ann foo(x)
3-
let s3 = x |> foo
3+
let s3 = @ann x |> foo

0 commit comments

Comments
 (0)