Module IR.QualifiedCppName

exception ParseError of string
type t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
val yojson_of_t : t -> Ppx_yojson_conv_lib.Yojson.Safe.t
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
val hash_normalize : t -> t
val hash_normalize_opt : t option -> t option
val hash_normalize_list : t list -> t list
val empty : t

empty qualified name

val of_qual_string : string -> t

attempts to parse the argument into a list::of::possibly::templated<T>::qualifiers

val to_qual_string : t -> string

returns qualified name as a string with "::" as a separator between qualifiers

val append_qualifier : t -> qual:string -> t

append qualifier to the end (innermost scope) of the qualified name

val extract_last : t -> (string * t) option

returns last (innermost scope) qualifier and qualified name without last qualifier

val strip_template_args : t -> t

returns qualified name without template arguments. For example:

  • input: std::shared_ptr<int>::shared_ptr<long>
  • output: std::shared_ptr::shared_ptr
val compare_name : t -> t -> int

similar to compare, but compares only names, except template arguments

val append_template_args_to_last : t -> args:string -> t

append template arguments to the last qualifier. Fails if qualified name is empty or it already has template args

val to_list : t -> string list

returns list of qualifiers

val to_rev_list : t -> string list

returns reversed list of qualifiers, ie innermost scope is the first element

val of_list : string list -> t

given list of qualifiers in normal order produce qualified name "std", "move"

val of_rev_list : string list -> t

given reversed list of qualifiers, produce qualified name (ie. "move", "std" for std::move )

val from_field_qualified_name : t -> t
val pp : Stdlib.Format.formatter -> t -> unit
module Match : sig ... end

Module to match qualified C++ procnames "fuzzily", that is up to namescapes and templating. In particular, this deals with the following issues: