jon.recoil.org

Module Merlin_kernel.MbrowseSource

Sourcetype t = (Ocaml_typing.Env.t * node) list
Sourcemodule Let_pun_behavior : sig ... end
Sourceval leaf_node : t -> Ocaml_typing.Env.t * node
Sourceval drop_leaf : t -> t option
Sourceval deepest_before : ?let_pun_behavior:Let_pun_behavior.t -> ?record_pattern_pun_behavior:Record_pattern_pun_behavior.t -> 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.

let_pun_behavior dictates whether to prefer the expression or pattern node in a punned let expression. The default is Prefer_pattern

Sourceval select_open_node : t -> (Ocaml_typing.Path.t * Ocaml_parsing.Longident.t * t) option
Sourceval enclosing : ?let_pun_behavior:Let_pun_behavior.t -> ?record_pattern_pun_behavior:Record_pattern_pun_behavior.t -> Merlin_utils.Std.Lexing.position -> t list -> t

let_pun_behavior dictates whether to prefer the expression or pattern node in a punned let expression. The default is Prefer_pattern

Sourceval of_typedtree : [ `Implementation of Ocaml_typing.Typedtree.structure | `Interface of Ocaml_typing.Typedtree.signature ] -> t
Sourceval is_recovered_expression : Ocaml_typing.Typedtree.expression -> bool

Identify nodes introduced by recovery

Sourceval 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

Sourceval print_node : unit -> node -> string
Sourceval print : unit -> t -> string