ocaml-trace/ppxlib/Ppxlib/Pp_ast/Config/index.html
2025-12-12 13:56:43 +00:00

8 lines
3.1 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Config (ppxlib.Ppxlib.Pp_ast.Config)</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> &#x00BB; <a href="../../../index.html">ppxlib</a> &#x00BB; <a href="../../index.html">Ppxlib</a> &#x00BB; <a href="../index.html">Pp_ast</a> &#x00BB; Config</nav><header class="odoc-preamble"><h1>Module <code><span>Pp_ast.Config</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>Type for AST pretty-printing config</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-make"><a href="#val-make" class="anchor"></a><code><span><span class="keyword">val</span> make :
<span><span class="optlabel">?show_attrs</span>:bool <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?show_locs</span>:bool <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?loc_mode</span>:<span>[ `Short <span>| `Full</span> ]</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?printer</span>:<span><a href="../index.html#type-repr">repr</a> <a href="../index.html#type-pp">pp</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
<a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Create a custom pretty-printing config. Default values are the ones that are used when no configuration is passed to the pretty-printers defined in <a href="../index.html"><code>Pp_ast</code></a>.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">?show_attrs</span> <p>controls whether attributes are shown or hidden. Defaults to <code>false</code>.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">?show_loc</span> <p>controls whether locations are shown or hidden. Defaults to <code>false</code>.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">?loc_mode</span> <p>controls how locations are shown if they are shown at all. Defaults to <code>`Short</code>.</p><ul><li>When set to <code>`Short</code>, locations are displayed as <code>&quot;l1c6..l2c2&quot;</code> for multiline locations and as <code>&quot;l1c6..12&quot;</code> for single line locations. Ghost locations are suffixed with a <code>&quot;(g)&quot;</code>.</li><li>When set to <code>`Full</code>, locations are displayed as any other record would be.</li></ul></li></ul></div></div></div></body></html>