Skip to content

Commit 7ca5517

Browse files
committed
Handle doc comment
1 parent 5912a52 commit 7ca5517

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

jscomp/syntax/src/res_core.ml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6008,7 +6008,14 @@ and parseModuleBindingBody p =
60086008
and parseModuleBindings ~attrs ~startPos p =
60096009
let rec loop p acc =
60106010
let startPos = p.Parser.startPos in
6011-
let attrs = parseAttributesAndBinding p in
6011+
let docAttr : Parsetree.attributes =
6012+
match p.Parser.token with
6013+
| DocComment (loc, s) ->
6014+
Parser.next p;
6015+
[docCommentToAttribute loc s]
6016+
| _ -> []
6017+
in
6018+
let attrs = docAttr @ parseAttributesAndBinding p in
60126019
match p.Parser.token with
60136020
| And ->
60146021
Parser.next p;

0 commit comments

Comments
 (0)