Skip to content

Commit db389a2

Browse files
committed
Don't filter hidden nodes when doing occurrences
1 parent 0e9e3bd commit db389a2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/analysis/ast_iterators.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ let iter_on_usages ~f (local_defs : Mtyper.typedtree) =
162162
| `Implementation structure -> iter.structure iter structure
163163
end
164164

165-
let iterator_on_usages ~f =
165+
let iterator_on_usages ~include_hidden ~f =
166166
let occ_iter = Cmt_format.iter_on_occurrences ~f in
167-
iter_only_visible occ_iter
167+
match include_hidden with
168+
| false -> iter_only_visible occ_iter
169+
| true -> occ_iter

src/analysis/index_occurrences.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ let iterator ~current_buffer_path ~index ~stamp ~reduce_for_uid =
8181
index_decl ()
8282
end
8383
in
84-
Ast_iterators.iterator_on_usages ~f
84+
Ast_iterators.iterator_on_usages ~include_hidden:true ~f
8585

8686
let items ~index ~stamp (config : Mconfig.t) items =
8787
let module Shape_reduce = Shape_reduce.Make (struct

0 commit comments

Comments
 (0)