ocaml-trace/ppxlib/Ppxlib/Code_path/index.html
2024-03-08 16:51:12 +00:00

2 lines
No EOL
4.8 KiB
HTML
Raw 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>Code_path (ppxlib.Ppxlib.Code_path)</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> &#x00BB; <a href="../index.html">Ppxlib</a> &#x00BB; Code_path</nav><header class="odoc-preamble"><h1>Module <code><span>Ppxlib.Code_path</span></code></h1><p>This module contains type and functions for representing and manipulating path to AST nodes.</p></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 path to AST nodes</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-file_path"><a href="#val-file_path" class="anchor"></a><code><span><span class="keyword">val</span> file_path : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p>Return the path to the .ml or .mli file for this code path.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-main_module_name"><a href="#val-main_module_name" class="anchor"></a><code><span><span class="keyword">val</span> main_module_name : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p>Return the module name corresponding to the file to which this code path leads to.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-submodule_path"><a href="#val-submodule_path" class="anchor"></a><code><span><span class="keyword">val</span> submodule_path : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>string list</span></span></code></div><div class="spec-doc"><p>Return the path within the main module this code path represents as a list of module names.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-enclosing_module"><a href="#val-enclosing_module" class="anchor"></a><code><span><span class="keyword">val</span> enclosing_module : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p>Return the nearest enclosing module name. Does descend into expressions.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-value"><a href="#val-value" class="anchor"></a><code><span><span class="keyword">val</span> value : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>string option</span></span></code></div><div class="spec-doc"><p>Return the name of the value to which this code path leads or <code>None</code> if it leads to the toplevel of a module or submodule.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-enclosing_value"><a href="#val-enclosing_value" class="anchor"></a><code><span><span class="keyword">val</span> enclosing_value : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>string option</span></span></code></div><div class="spec-doc"><p>Like <code>value</code>, returns the name of an enclosing value definition. Unlike <code>value</code>, includes names inside expressions, not just names that the code path can reach from the toplevel module.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-fully_qualified_path"><a href="#val-fully_qualified_path" class="anchor"></a><code><span><span class="keyword">val</span> fully_qualified_path : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p>Return the fully qualified path to the module or value this code path leads to, eg <code>&quot;Some_main_module.Some_submodule.some_value&quot;</code>. Note that the fully qualified path doesn't descend into expressions which means it will always stop at the first value description or value binding.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_string_path"><a href="#val-to_string_path" class="anchor"></a><code><span><span class="keyword">val</span> to_string_path : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p>Return the string version of this code path as built by <code>Ast_traverse.map_with_path</code>. Used for compatibility with path from version 0.5.0 and lower.</p></div></div></div></body></html>