package merlin-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=de395dd37d246e3ec303e1af35ff8421665fa4f0f0005d95732124b22e3417ac
sha512=74756b28767cdfe10288720540582e818a9d946dd2406606724ebc7b68d1cf6623142e56a1e457f7862839732e7add365aec056930c7ac89be7036c22e5f29ae
doc/merlin-lib.kernel/Merlin_kernel/Mbrowse/index.html
Module Merlin_kernel.MbrowseSource
val fold_node :
(Ocaml_typing.Env.t -> Merlin_specific.Browse_raw.node -> 'a -> 'a) ->
Ocaml_typing.Env.t ->
Merlin_specific.Browse_raw.node ->
'a ->
'aWhen a node is inside parenthesis or begin ... end, the node's location contains the delimiters. The locs returned by this function is the location of the node inside the delimiters. In case of nesting, such as ((x)) multiple locations are returned: the one for (x) and the one for x.
Some nodes in the typedtree may share the same, non-ghost, location, while being different. One example of this is let-punning:
val deepest_before :
?disambiguate:Tie_breaker.t ->
Merlin_utils.Std.Lexing.position ->
t list ->
tThe 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 enclosing :
?disambiguate:Tie_breaker.t ->
Merlin_utils.Std.Lexing.position ->
t list ->
tval range_enclosing :
start:Merlin_utils.Std.Lexing.position ->
stop:Merlin_utils.Std.Lexing.position ->
t list ->
tval of_typedtree :
[ `Implementation of Ocaml_typing.Typedtree.structure
| `Interface of Ocaml_typing.Typedtree.signature ] ->
tIdentify nodes introduced by recovery
val optional_label_sugar :
Ocaml_typing.Typedtree.expression_desc ->
Ocaml_typing.Typedtree.expression optionWhen 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.