package merlin-lib

  1. Overview
  2. Docs
On This Page
  1. Dump
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = (Ocaml_typing.Env.t * node) list
val leaf_node : t -> Ocaml_typing.Env.t * node
val drop_leaf : t -> t option
val deepest_before : Merlin_utils.Std.Lexing.position -> t list -> t

The deepest context inside or before the node, for instance, navigating * through: * foo bar (baz :: tail) <cursor> * asking for node from cursor position will return context of "tail". * Returns the matching node and all its ancestors or the empty list.

val select_open_node : t -> (Ocaml_typing.Path.t * Ocaml_parsing.Longident.t * t) option
val enclosing : Merlin_utils.Std.Lexing.position -> t list -> t
val of_structure : Ocaml_typing.Typedtree.structure -> t
val of_signature : Ocaml_typing.Typedtree.signature -> t
val of_typedtree : [ `Implementation of Ocaml_typing.Typedtree.structure | `Interface of Ocaml_typing.Typedtree.signature ] -> t
val is_recovered_expression : Ocaml_typing.Typedtree.expression -> bool

Identify nodes introduced by recovery

val is_recovered : Merlin_specific.Browse_raw.node -> bool

When an optional argument is applied with labelled syntax sugar (~a:v instead of ?a:(Some v)), the frontend will have wrapped it in Some _. optional_label_sugar exp returns Some exp' with the sugar removed in that case.

Dump

val print_node : unit -> node -> string
val print : unit -> t -> string
OCaml

Innovation. Community. Security.