Skip to content

Commit 01631e9

Browse files
committed
search for all attrs
1 parent 4b3479b commit 01631e9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

analysis/src/ProcessCmt.ml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,9 +593,11 @@ and forStructure ~name ~env strItems =
593593
strItems []
594594
in
595595
let attributes =
596-
match strItems with
597-
| {str_desc = Tstr_attribute attribute} :: _ -> [attribute]
598-
| _ -> []
596+
strItems
597+
|> List.filter_map (fun (struc : Typedtree.structure_item) ->
598+
match struc with
599+
| {str_desc = Tstr_attribute attr} -> Some attr
600+
| _ -> None)
599601
in
600602
let docstring = attrsToDocstring attributes in
601603
let deprecated = ProcessAttributes.findDeprecatedAttribute attributes in

0 commit comments

Comments
 (0)