mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-10 12:45:44 -04:00
2 lines
No EOL
3.5 KiB
HTML
2 lines
No EOL
3.5 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Ast_builder (ppxlib.Ppxlib.Ast_builder)</title><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.2"/><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">ppxlib</a> » <a href="../index.html">Ppxlib</a> » Ast_builder</nav><header class="odoc-preamble"><h1>Module <code><span>Ppxlib.Ast_builder</span></code></h1><p><code>Ast_builder</code> is a module to generate OCaml AST fragments. It provides a shorter syntax than directly using the <a href="../../Astlib/Ast_500/Parsetree/index.html"><code>Parsetree</code></a> constructors, as well as a better stability than the constructors.</p></header><nav class="odoc-toc"><ul><li><a href="#link-to-the-tutorial">Link to the tutorial</a></li><li><a href="#api">API</a></li></ul></nav><div class="odoc-content"><h2 id="link-to-the-tutorial"><a href="#link-to-the-tutorial" class="anchor"></a>Link to the tutorial</h2><p>For a detailed explanation on this module, refer to the <a href="../../generating-code.html#ast_builder">relevant</a> part of the manual.</p><h2 id="api"><a href="#api" class="anchor"></a>API</h2><div class="odoc-spec"><div class="spec module anchored" id="module-Default"><a href="#module-Default" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Default/index.html">Default</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Helpers taking a <code>~loc</code> argument. This module is meant to be opened or aliased.</p></div></div><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-Loc"><a href="#module-type-Loc" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-Loc/index.html">Loc</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-S/index.html">S</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/argument-1-Loc/index.html">Loc</a> : <a href="module-type-Loc/index.html">Loc</a>) : <a href="module-type-S/index.html">S</a></span></code></div><div class="spec-doc"><p>Build Ast helpers with the location argument factorized.</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><a href="../Location/index.html#type-t">Location.t</a> <span class="arrow">-></span></span> <span>(<span class="keyword">module</span> <a href="module-type-S/index.html">S</a>)</span></span></code></div><div class="spec-doc"><p>Functional version of <code>Make</code>.</p></div></div></div></body></html> |