mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-09 12:23:32 -04:00
10 lines
4.5 KiB
HTML
10 lines
4.5 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Merlin_helpers (ppxlib.Ppxlib.Merlin_helpers)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">ppxlib</a> » <a href="../index.html">Ppxlib</a> » Merlin_helpers</nav><header class="odoc-preamble"><h1>Module <code><span>Ppxlib.Merlin_helpers</span></code></h1><p>Some helpers to annotate the AST so merlin can decide which branches to look at and which branches to ignore.</p><p>More information can be found in the section of the manual about <a href="../../good-practices.html#resp_loc" title="resp_loc">locations</a>.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#annotations-merlin-understand">Annotations merlin understand</a></li><li><a href="#helpers">Helpers</a></li></ul></nav></div><div class="odoc-content"><h3 id="annotations-merlin-understand"><a href="#annotations-merlin-understand" class="anchor"></a>Annotations merlin understand</h3><div class="odoc-spec"><div class="spec value anchored" id="val-hide_attribute"><a href="#val-hide_attribute" class="anchor"></a><code><span><span class="keyword">val</span> hide_attribute : <a href="../../Astlib/Ast_502/Parsetree/index.html#type-attribute">Astlib.Ast_502.Parsetree.attribute</a></span></code></div><div class="spec-doc"><p>Adding this <code>[@merlin.hide]</code> attribute on a piece of AST "hides" it from merlin: it tells merlin not to consider that branch if another piece of AST with the same location exist.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-focus_attribute"><a href="#val-focus_attribute" class="anchor"></a><code><span><span class="keyword">val</span> focus_attribute : <a href="../../Astlib/Ast_502/Parsetree/index.html#type-attribute">Astlib.Ast_502.Parsetree.attribute</a></span></code></div><div class="spec-doc"><p>Adding this <code>[@merlin.focus]</code> attribute on a piece of AST tells merlin to prefer it to any other piece of AST when several have the same location.</p></div></div><h3 id="helpers"><a href="#helpers" class="anchor"></a>Helpers</h3><p>The following functions add the corresponding attribute (defined above) to specific pieces of AST.</p><div class="odoc-spec"><div class="spec value anchored" id="val-hide_pattern"><a href="#val-hide_pattern" class="anchor"></a><code><span><span class="keyword">val</span> hide_pattern :
|
||
<span><a href="../../Astlib/Ast_502/Parsetree/index.html#type-pattern">Astlib.Ast_502.Parsetree.pattern</a> <span class="arrow">-></span></span>
|
||
<a href="../../Astlib/Ast_502/Parsetree/index.html#type-pattern">Astlib.Ast_502.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-focus_pattern"><a href="#val-focus_pattern" class="anchor"></a><code><span><span class="keyword">val</span> focus_pattern :
|
||
<span><a href="../../Astlib/Ast_502/Parsetree/index.html#type-pattern">Astlib.Ast_502.Parsetree.pattern</a> <span class="arrow">-></span></span>
|
||
<a href="../../Astlib/Ast_502/Parsetree/index.html#type-pattern">Astlib.Ast_502.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-hide_expression"><a href="#val-hide_expression" class="anchor"></a><code><span><span class="keyword">val</span> hide_expression :
|
||
<span><a href="../../Astlib/Ast_502/Parsetree/index.html#type-expression">Astlib.Ast_502.Parsetree.expression</a> <span class="arrow">-></span></span>
|
||
<a href="../../Astlib/Ast_502/Parsetree/index.html#type-expression">Astlib.Ast_502.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-focus_expression"><a href="#val-focus_expression" class="anchor"></a><code><span><span class="keyword">val</span> focus_expression :
|
||
<span><a href="../../Astlib/Ast_502/Parsetree/index.html#type-expression">Astlib.Ast_502.Parsetree.expression</a> <span class="arrow">-></span></span>
|
||
<a href="../../Astlib/Ast_502/Parsetree/index.html#type-expression">Astlib.Ast_502.Parsetree.expression</a></span></code></div></div></div></body></html>
|