File tree Expand file tree Collapse file tree 6 files changed +20
-4
lines changed Expand file tree Collapse file tree 6 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1717- Fix incorrect incorrect printing of module binding with signature. https://github.com/rescript-lang/rescript-compiler/pull/6963
1818- Disallow spreading anything but regular variants inside of other variants. https://github.com/rescript-lang/rescript-compiler/pull/6980
1919- Fix comment removed when function signature has ` type ` keyword. https://github.com/rescript-lang/rescript-compiler/pull/6997
20+ - Fix parse error on doc comment before "and" in type def. https://github.com/rescript-lang/rescript-compiler/pull/7001
2021
2122# 11.1.3
2223
Original file line number Diff line number Diff line change @@ -2525,7 +2525,7 @@ and parseAttributesAndBinding (p : Parser.t) =
25252525 let comments = p.comments in
25262526
25272527 match p.Parser. token with
2528- | At -> (
2528+ | At | DocComment ( _ , _ ) -> (
25292529 let attrs = parseAttributes p in
25302530 match p.Parser. token with
25312531 | And -> attrs
Original file line number Diff line number Diff line change @@ -14,4 +14,8 @@ let q = 11
1414 * is a multi-line
1515 multiline doc comment
1616 */
17- type h = int
17+ type h = int
18+
19+ type pathItem = {}
20+ /** Issue 6844: doc comment before "and" */
21+ and operation = {}
Original file line number Diff line number Diff line change @@ -4,4 +4,8 @@ let z = 34[@@res.doc " This is a doc \226\156\133 comment "]
44[@@@res.doc {js|And this is a res.doc module annotation|js}]
55let q = 11[@@res.doc {js|And this is a res.doc ✅ annotation|js}]
66type nonrec h = int[@@res.doc
7- " This\n * is a multi-line\n multiline doc comment\n "]
7+ " This\n * is a multi-line\n multiline doc comment\n "]
8+ type nonrec pathItem = {
9+ }
10+ and operation = {
11+ }[@@res.doc " Issue 6844: doc comment before \"and\" "]
Original file line number Diff line number Diff line change @@ -26,4 +26,8 @@ type h = int
2626@foo @bar @baz let x = 10
2727
2828/** doc comment and 0 attributes */
29- let x = 10
29+ let x = 10
30+
31+ type pathItem = {}
32+ /** Issue 6844: doc comment before "and" */
33+ and operation = {}
Original file line number Diff line number Diff line change @@ -31,3 +31,6 @@ let x = 10
3131
3232/** doc comment and 0 attributes */
3333let x = 10
34+
35+ type pathItem = {}
36+ /** Issue 6844: doc comment before "and" */ and operation = {}
You can’t perform that action at this time.
0 commit comments