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 17
17
- Fix incorrect incorrect printing of module binding with signature. https://github.com/rescript-lang/rescript-compiler/pull/6963
18
18
- Disallow spreading anything but regular variants inside of other variants. https://github.com/rescript-lang/rescript-compiler/pull/6980
19
19
- 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
20
21
21
22
# 11.1.3
22
23
Original file line number Diff line number Diff line change @@ -2525,7 +2525,7 @@ and parseAttributesAndBinding (p : Parser.t) =
2525
2525
let comments = p.comments in
2526
2526
2527
2527
match p.Parser. token with
2528
- | At -> (
2528
+ | At | DocComment ( _ , _ ) -> (
2529
2529
let attrs = parseAttributes p in
2530
2530
match p.Parser. token with
2531
2531
| And -> attrs
Original file line number Diff line number Diff line change @@ -14,4 +14,8 @@ let q = 11
14
14
* is a multi-line
15
15
multiline doc comment
16
16
*/
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 "]
4
4
[@@@res.doc {js|And this is a res.doc module annotation|js}]
5
5
let q = 11[@@res.doc {js|And this is a res.doc ✅ annotation|js}]
6
6
type 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
26
26
@foo @bar @baz let x = 10
27
27
28
28
/** 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
31
31
32
32
/** doc comment and 0 attributes */
33
33
let 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