Skip to content

Commit 0904b73

Browse files
aspeddrocristianoc
authored andcommitted
add Pstr_primitive
1 parent e145f17 commit 0904b73

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

analysis/src/SemanticTokens.ml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,14 @@ let command ~debug ~emitter ~path =
395395
Ast_iterator.default_iterator.constructor_declaration iterator cd
396396
in
397397

398+
let structure_item (iterator : Ast_iterator.iterator)
399+
(item : Parsetree.structure_item) =
400+
(match item.pstr_desc with
401+
| Pstr_primitive {pval_name = {txt = id; loc}} -> emitter |> emitVariable ~id ~debug ~loc;
402+
| _ -> ());
403+
Ast_iterator.default_iterator.structure_item iterator item
404+
in
405+
398406
let iterator =
399407
{
400408
Ast_iterator.default_iterator with
@@ -410,6 +418,7 @@ let command ~debug ~emitter ~path =
410418
pat;
411419
typ;
412420
type_declaration;
421+
structure_item;
413422
}
414423
in
415424

0 commit comments

Comments
 (0)