summaryrefslogtreecommitdiff
path: root/src/Names.ml
diff options
context:
space:
mode:
authorSon Ho2022-05-06 10:34:55 +0200
committerSon Ho2022-05-06 10:34:55 +0200
commit61dfbf38e22a5ba1f90ab8246b93b972d881c3b3 (patch)
tree0fc5bcc92b8bedd9982d349f8a978e079d9536a3 /src/Names.ml
parent845467d967a6416891d1ddf39d0a0796e6ac8ac6 (diff)
Don't use the Rust disambiguators when generating names at extraction
Diffstat (limited to 'src/Names.ml')
-rw-r--r--src/Names.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Names.ml b/src/Names.ml
index 5785d06f..a57f9aa1 100644
--- a/src/Names.ml
+++ b/src/Names.ml
@@ -61,6 +61,13 @@ let filter_disambiguators_zero (n : name) : name =
in
List.filter pred n
+(** Filter the disambiguators in a name *)
+let filter_disambiguators (n : name) : name =
+ let pred (pe : path_elem) : bool =
+ match pe with Ident _ -> true | Disambiguator _ -> false
+ in
+ List.filter pred n
+
let as_ident (pe : path_elem) : string =
match pe with
| Ident s -> s