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

2 lines
3.6 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>Ast_builder (ppxlib.Ppxlib.Ast_builder)</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; 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_502/Parsetree/index.html"><code>Parsetree</code></a> constructors, as well as a better stability than the constructors.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-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><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" title="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">&#45;&gt;</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>