Module Merlin_analysis.Typedtree_utilsSource

Utilities to keep explicit Typedtree manipulations local to Merlin_lib for alternative clients like ocaml-lsp.

Sourceval extract_toplevel_identifier : Ocaml_typing.Typedtree.signature_item -> Ocaml_typing.Ident.t list

extract_toplevel_identifier sigitem extracts toplevel identifier of a signature item. It returns a list for dealing with recursive elements.

let_bound_vars binding_list extract the Ident.t and the location of variables bind in the form of let b = e ... in a list of bindings.

pat_var_id_and_loc try to extract the id and the location of pattern variable.

pat_alias_id_and_loc try to extract the id and the location of pattern alias.