-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
760 changed files
with
6,519 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>index</title> | ||
<link rel="stylesheet" href="./odoc.support/odoc.css"/> | ||
<meta charset="utf-8"/> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/> | ||
</head> | ||
<body> | ||
<main class="content"> | ||
<div class="by-name"> | ||
<h2>OCaml package documentation</h2> | ||
<ol> | ||
<li><a href="odoc/index.html">odoc</a> <span class="version">2.4.0</span></li> | ||
<li><a href="odoc-parser/index.html">odoc-parser</a> <span class="version">2.4.0</span></li> | ||
</ol> | ||
</div> | ||
</main> | ||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Loc (odoc-parser.Odoc_parser.Loc)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/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">odoc-parser</a> » <a href="../index.html">Odoc_parser</a> » Loc</nav><header class="odoc-preamble"><h1>Module <code><span>Odoc_parser.Loc</span></code></h1><p>Locations in files.</p></header><nav class="odoc-toc"><ul><li><a href="#basic-types">Basic types</a></li><li><a href="#located-values">Located values</a></li></ul></nav><div class="odoc-content"><p>This module concerns locations in source files, both points indicating a specific character and spans between two points.</p><h3 id="basic-types"><a href="#basic-types" class="anchor"></a>Basic types</h3><div class="odoc-spec"><div class="spec type anchored" id="type-point"><a href="#type-point" class="anchor"></a><code><span><span class="keyword">type</span> point</span><span> = </span><span>{</span></code><ol><li id="type-point.line" class="def record field anchored"><a href="#type-point.line" class="anchor"></a><code><span>line : int;</span></code></li><li id="type-point.column" class="def record field anchored"><a href="#type-point.column" class="anchor"></a><code><span>column : int;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>A specific character</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-span"><a href="#type-span" class="anchor"></a><code><span><span class="keyword">type</span> span</span><span> = </span><span>{</span></code><ol><li id="type-span.file" class="def record field anchored"><a href="#type-span.file" class="anchor"></a><code><span>file : string;</span></code></li><li id="type-span.start" class="def record field anchored"><a href="#type-span.start" class="anchor"></a><code><span>start : <a href="#type-point">point</a>;</span></code></li><li id="type-span.end_" class="def record field anchored"><a href="#type-span.end_" class="anchor"></a><code><span>end_ : <a href="#type-point">point</a>;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>A range of characters between <code>start</code> and <code>end_</code> in a particular file</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-span"><a href="#val-span" class="anchor"></a><code><span><span class="keyword">val</span> span : <span><span><a href="#type-span">span</a> list</span> <span class="arrow">-></span></span> <a href="#type-span">span</a></span></code></div><div class="spec-doc"><p><code>span spans</code> takes a list of spans and returns a single <a href="#type-span"><code>span</code></a> starting at the start of the first span and ending at the end of the final span</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-nudge_start"><a href="#val-nudge_start" class="anchor"></a><code><span><span class="keyword">val</span> nudge_start : <span>int <span class="arrow">-></span></span> <span><a href="#type-span">span</a> <span class="arrow">-></span></span> <a href="#type-span">span</a></span></code></div><div class="spec-doc"><p>This adjusts only the column number, implicitly assuming that the offset does not move the location across a newline character.</p></div></div><h3 id="located-values"><a href="#located-values" class="anchor"></a>Located values</h3><div class="odoc-spec"><div class="spec type anchored" id="type-with_location"><a href="#type-with_location" class="anchor"></a><code><span><span class="keyword">type</span> <span>+'a with_location</span></span><span> = </span><span>{</span></code><ol><li id="type-with_location.location" class="def record field anchored"><a href="#type-with_location.location" class="anchor"></a><code><span>location : <a href="#type-span">span</a>;</span></code></li><li id="type-with_location.value" class="def record field anchored"><a href="#type-with_location.value" class="anchor"></a><code><span>value : <span class="type-var">'a</span>;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>Describes values located at a particular span</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-at"><a href="#val-at" class="anchor"></a><code><span><span class="keyword">val</span> at : <span><a href="#type-span">span</a> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-with_location">with_location</a></span></span></code></div><div class="spec-doc"><p>Constructor for <a href="#type-with_location"><code>with_location</code></a></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-location"><a href="#val-location" class="anchor"></a><code><span><span class="keyword">val</span> location : <span><span><span class="type-var">'a</span> <a href="#type-with_location">with_location</a></span> <span class="arrow">-></span></span> <a href="#type-span">span</a></span></code></div><div class="spec-doc"><p>Returns the location of a located value</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><span><span class="type-var">'a</span> <a href="#type-with_location">with_location</a></span> <span class="arrow">-></span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p>Returns the value of a located value</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-map"><a href="#val-map" class="anchor"></a><code><span><span class="keyword">val</span> map : <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span class="type-var">'b</span>)</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-with_location">with_location</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-with_location">with_location</a></span></span></code></div><div class="spec-doc"><p>Map over a located value without changing its location</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-same"><a href="#val-same" class="anchor"></a><code><span><span class="keyword">val</span> same : <span><span><span class="type-var">_</span> <a href="#type-with_location">with_location</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-with_location">with_location</a></span></span></code></div><div class="spec-doc"><p><code>same x y</code> retuns the value y wrapped in a <a href="#type-with_location"><code>with_location</code></a> whose location is that of <code>x</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-spans_multiple_lines"><a href="#val-spans_multiple_lines" class="anchor"></a><code><span><span class="keyword">val</span> spans_multiple_lines : <span><span><span class="type-var">_</span> <a href="#type-with_location">with_location</a></span> <span class="arrow">-></span></span> bool</span></code></div><div class="spec-doc"><p><code>spans_multiple_lines x</code> checks to see whether <code>x</code> is located on a single line or whether it covers more than one.</p></div></div></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Warning (odoc-parser.Odoc_parser.Warning)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/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">odoc-parser</a> » <a href="../index.html">Odoc_parser</a> » Warning</nav><header class="odoc-preamble"><h1>Module <code><span>Odoc_parser.Warning</span></code></h1><p>Warnings produced during parsing.</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><span> = </span><span>{</span></code><ol><li id="type-t.location" class="def record field anchored"><a href="#type-t.location" class="anchor"></a><code><span>location : <a href="../Loc/index.html#type-span">Loc.span</a>;</span></code></li><li id="type-t.message" class="def record field anchored"><a href="#type-t.message" class="anchor"></a><code><span>message : string;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>Warnings are represented as record containing the human-readable text of the warning alongside the location of the offending text in the source</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span><span class="keyword">val</span> pp : <span><span class="xref-unresolved">Stdlib</span>.Format.formatter <span class="arrow">-></span></span> <span><a href="#type-t">t</a> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p>Pretty printer for <a href="#type-t"><code>t</code></a></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_string"><a href="#val-to_string" class="anchor"></a><code><span><span class="keyword">val</span> to_string : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> string</span></code></div><div class="spec-doc"><p><code>to_string</code> will format the location and warning as text to be printed.</p></div></div></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Odoc_parser (odoc-parser.Odoc_parser)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../odoc.support/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">odoc-parser</a> » Odoc_parser</nav><header class="odoc-preamble"><h1>Module <code><span>Odoc_parser</span></code></h1><p>Parser for ocamldoc formatted comments.</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><code>type t</code> is the result of parsing.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-parse_comment"><a href="#val-parse_comment" class="anchor"></a><code><span><span class="keyword">val</span> parse_comment : <span><span class="label">location</span>:<span class="xref-unresolved">Stdlib</span>.Lexing.position <span class="arrow">-></span></span> <span><span class="label">text</span>:string <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>parse_comment ~location ~text</code> parses <code>text</code> as an ocamldoc formatted string. The parser will try to recover from any invalid syntax encountered, and therefore this will always produce a result without raising exceptions with zero or more warnings. The location passed in should represent the start of the <i>content</i> of the documentation comment - so for a line such as</p><pre class="language-ocaml"><code>(** A comment starting in the first column (0) *)</code></pre><p>the location should represent the space immediately before the <code>A</code>, so the in the 4th column (e.g. <code>{... pos_bol=0; pos_cnum=3 }</code>)</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Ast"><a href="#module-Ast" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Ast/index.html">Ast</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Abstract syntax tree representing ocamldoc comments</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Loc"><a href="#module-Loc" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Loc/index.html">Loc</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Locations in files.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Warning"><a href="#module-Warning" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Warning/index.html">Warning</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Warnings produced during parsing.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-warnings"><a href="#val-warnings" class="anchor"></a><code><span><span class="keyword">val</span> warnings : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="Warning/index.html#type-t">Warning.t</a> list</span></span></code></div><div class="spec-doc"><p>Extract any warnings from the parser result.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ast"><a href="#val-ast" class="anchor"></a><code><span><span class="keyword">val</span> ast : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="Ast/index.html#type-t">Ast.t</a></span></code></div><div class="spec-doc"><p>Extract the <a href="Ast/index.html#type-t"><code>Ast.t</code></a> from the parser result.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-position_of_point"><a href="#val-position_of_point" class="anchor"></a><code><span><span class="keyword">val</span> position_of_point : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="Loc/index.html#type-point">Loc.point</a> <span class="arrow">-></span></span> <span class="xref-unresolved">Stdlib</span>.Lexing.position</span></code></div><div class="spec-doc"><p>Helper function to turn the internal representation of positions back into the usual representation in the Lexing module. Note that this relies on the information passed in <a href="#val-parse_comment"><code>parse_comment</code></a>, and hence requires the result of that call in addition to the <a href="Loc/index.html#type-point"><code>Loc.point</code></a> being converted.</p></div></div></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (odoc-parser.index)</title><meta charset="utf-8"/><link rel="stylesheet" href="../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – odoc-parser</nav><header class="odoc-preamble"><h1 id="odoc-parser-index"><a href="#odoc-parser-index" class="anchor"></a>odoc-parser index</h1></header><nav class="odoc-toc"><ul><li><a href="#library-odoc-parser">Library odoc-parser</a></li></ul></nav><div class="odoc-content"><h2 id="library-odoc-parser"><a href="#library-odoc-parser" class="anchor"></a>Library odoc-parser</h2><p>The entry point of this library is the module: <a href="Odoc_parser/index.html"><code>Odoc_parser</code></a>.</p></div></body></html> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.