mirror of
https://github.com/status-im/NimYAML.git
synced 2025-01-12 20:44:46 +00:00
updated from devel
This commit is contained in:
parent
9c795cbbe3
commit
69eaec0d2d
2
api.html
2
api.html
@ -68,7 +68,7 @@
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:27 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:33 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -381,7 +381,7 @@
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:27 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:33 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -114,7 +114,7 @@
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:27 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:33 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -206,7 +206,7 @@
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:27 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:33 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -112,7 +112,7 @@
|
||||
var params = "style=" + encodeURIComponent(document.querySelector(
|
||||
"input[name=style]:checked").value) + "&input=" + encodeURIComponent(
|
||||
document.getElementById("yaml-input").value);
|
||||
r.open("POST", "http://flyx.org:5000", true);
|
||||
r.open("POST", "https://nimyaml.org/webservice/", true);
|
||||
r.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
r.onreadystatechange = function() {
|
||||
if (r.readyState == 4) {
|
||||
@ -162,7 +162,7 @@
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:27 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:33 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
206
yaml.dom.html
206
yaml.dom.html
@ -76,8 +76,8 @@
|
||||
tag*: string
|
||||
case kind*: YamlNodeKind
|
||||
of yScalar: content*: string
|
||||
of ySequence: children*: seq[YamlNode]
|
||||
of yMapping: pairs*: seq[tuple[key, value: YamlNode]]"><wbr />Yaml<wbr />Node<wbr />Obj</a></li>
|
||||
of ySequence: elems*: seq[YamlNode]
|
||||
of yMapping: fields*: TableRef[YamlNode, YamlNode]"><wbr />Yaml<wbr />Node<wbr />Obj</a></li>
|
||||
<li><a class="reference" href="#YamlDocument"
|
||||
title="YamlDocument = object
|
||||
root*: YamlNode"><wbr />Yaml<wbr />Document</a></li>
|
||||
@ -87,23 +87,55 @@
|
||||
<li>
|
||||
<a class="reference reference-toplevel" href="#12" id="62">Procs</a>
|
||||
<ul class="simple simple-toc-section">
|
||||
<li><a class="reference" href="#newYamlNode,string,string"
|
||||
<li><a class="reference" href="#hash,YamlNode not nil"
|
||||
title="hash(o: YamlNode): Hash"><wbr />hash</a></li>
|
||||
<li><a class="reference" href="#==,YamlNode not nil,YamlNode not nil"
|
||||
title="`==`(x, y: YamlNode): bool"><wbr />`==`</a></li>
|
||||
<li><a class="reference" href="#$,YamlNode not nil"
|
||||
title="`$`(n: YamlNode): string"><wbr />`$`</a></li>
|
||||
<li><a class="reference" href="#newYamlNode,string,string"
|
||||
title="newYamlNode(content: string; tag: string = "?"): YamlNode"><wbr />new<wbr />Yaml<wbr />Node</a></li>
|
||||
<li><a class="reference" href="#newYamlNode,openArray[YamlNode not nil],string"
|
||||
title="newYamlNode(children: openArray[YamlNode]; tag: string = "?"): YamlNode"><wbr />new<wbr />Yaml<wbr />Node</a></li>
|
||||
<li><a class="reference" href="#newYamlNode,openArray[tuple[YamlNode not nil,YamlNode not nil]],string"
|
||||
title="newYamlNode(pairs: openArray[tuple[key, value: YamlNode]]; tag: string = "?"): YamlNode"><wbr />new<wbr />Yaml<wbr />Node</a></li>
|
||||
title="newYamlNode(elems: openArray[YamlNode]; tag: string = "?"): YamlNode"><wbr />new<wbr />Yaml<wbr />Node</a></li>
|
||||
<li><a class="reference" href="#newYamlNode,openArray[],string"
|
||||
title="newYamlNode(fields: openArray[(YamlNode, YamlNode)]; tag: string = "?"): YamlNode"><wbr />new<wbr />Yaml<wbr />Node</a></li>
|
||||
<li><a class="reference" href="#initYamlDoc,YamlNode not nil"
|
||||
title="initYamlDoc(root: YamlNode): YamlDocument"><wbr />init<wbr />Yaml<wbr />Doc</a></li>
|
||||
<li><a class="reference" href="#compose,YamlStream,TagLibrary"
|
||||
title="compose(s: var YamlStream; tagLib: TagLibrary): YamlDocument"><wbr />compose</a></li>
|
||||
<li><a class="reference" href="#loadDOM,"
|
||||
title="loadDOM[](s: Stream | string): YamlDocument"><wbr />load<wbr />DOM</a></li>
|
||||
<li><a class="reference" href="#loadDom,"
|
||||
title="loadDom(s: Stream | string): YamlDocument"><wbr />load<wbr />Dom</a></li>
|
||||
<li><a class="reference" href="#serialize,YamlDocument,TagLibrary,AnchorStyle"
|
||||
title="serialize(doc: YamlDocument; tagLib: TagLibrary; a: AnchorStyle = asTidy): YamlStream"><wbr />serialize</a></li>
|
||||
<li><a class="reference" href="#dumpDOM,YamlDocument,Stream,AnchorStyle,PresentationOptions"
|
||||
title="dumpDOM(doc: YamlDocument; target: Stream; anchorStyle: AnchorStyle = asTidy;
|
||||
options: PresentationOptions = defaultPresentationOptions)"><wbr />dump<wbr />DOM</a></li>
|
||||
<li><a class="reference" href="#dumpDom,YamlDocument,Stream,AnchorStyle,PresentationOptions"
|
||||
title="dumpDom(doc: YamlDocument; target: Stream; anchorStyle: AnchorStyle = asTidy;
|
||||
options: PresentationOptions = defaultPresentationOptions)"><wbr />dump<wbr />Dom</a></li>
|
||||
<li><a class="reference" href="#[],YamlNode not nil,int"
|
||||
title="`[]`(node: YamlNode; i: int): YamlNode"><wbr />`[]`</a></li>
|
||||
<li><a class="reference" href="#[]=,YamlNode not nil,int,YamlNode not nil"
|
||||
title="`[]=`(node: var YamlNode; i: int; val: YamlNode)"><wbr />`[]=`</a></li>
|
||||
<li><a class="reference" href="#[],YamlNode not nil,YamlNode not nil"
|
||||
title="`[]`(node: YamlNode; key: YamlNode): YamlNode"><wbr />`[]`</a></li>
|
||||
<li><a class="reference" href="#[]=,YamlNode not nil,YamlNode not nil,YamlNode not nil"
|
||||
title="`[]=`(node: YamlNode; key: YamlNode; value: YamlNode)"><wbr />`[]=`</a></li>
|
||||
<li><a class="reference" href="#[],YamlNode not nil,string"
|
||||
title="`[]`(node: YamlNode; key: string): YamlNode"><wbr />`[]`</a></li>
|
||||
<li><a class="reference" href="#len,YamlNode not nil"
|
||||
title="len(node: YamlNode): int"><wbr />len</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a class="reference reference-toplevel" href="#14" id="64">Iterators</a>
|
||||
<ul class="simple simple-toc-section">
|
||||
<li><a class="reference" href="#items.i,YamlNode not nil"
|
||||
title="items(node: YamlNode): YamlNode"><wbr />items</a></li>
|
||||
<li><a class="reference" href="#mitems.i,YamlNode not nil"
|
||||
title="mitems(node: var YamlNode): YamlNode"><wbr />mitems</a></li>
|
||||
<li><a class="reference" href="#pairs.i,YamlNode not nil"
|
||||
title="pairs(node: YamlNode): tuple[key, value: YamlNode]"><wbr />pairs</a></li>
|
||||
<li><a class="reference" href="#mpairs.i,YamlNode not nil"
|
||||
title="mpairs(node: var YamlNode): tuple[key: YamlNode, value: var YamlNode]"><wbr />mpairs</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@ -114,12 +146,13 @@
|
||||
<div class="nine columns" id="content">
|
||||
<div id="tocRoot"></div>
|
||||
<p class="module-desc"><p>This is the DOM API, which enables you to load YAML into a tree-like structure. It can also dump the structure back to YAML. Formally, it represents the <em>Representation Graph</em> as defined in the YAML specification.</p>
|
||||
<p>The main interface of this API are <tt class="docutils literal"><span class="pre">loadDOM</span></tt> and <tt class="docutils literal"><span class="pre">dumpDOM</span></tt>. The other exposed procs are low-level and useful if you want to load or generate parts of a <tt class="docutils literal"><span class="pre">YamlStream</span></tt>.</p>
|
||||
<p>The main interface of this API are <tt class="docutils literal"><span class="pre">loadDom</span></tt> and <tt class="docutils literal"><span class="pre">dumpDom</span></tt>. The other exposed procs are low-level and useful if you want to load or generate parts of a <tt class="docutils literal"><span class="pre">YamlStream</span></tt>.</p>
|
||||
<p>The <tt class="docutils literal"><span class="pre">YamlNode</span></tt> objects in the DOM can be used similarly to the <tt class="docutils literal"><span class="pre">JsonNode</span></tt> objects of Nim's <a class="reference external" href="http://nim-lang.org/docs/json.html">json module</a>.</p>
|
||||
</p>
|
||||
<section id="6">
|
||||
<h1><a class="toc-backref" href="#6">Imports</a></h1>
|
||||
<dl class="item">
|
||||
<a class="reference external" href="tables.html">tables</a>, <a class="reference external" href="streams.html">streams</a>, <a class="reference external" href="stream.html">stream</a>, <a class="reference external" href="taglib.html">taglib</a>, <a class="reference external" href="serialization.html">serialization</a>, <a class="reference external" href="../private/internal.html">../private/internal</a>, <a class="reference external" href="parser.html">parser</a>, <a class="reference external" href="presenter.html">presenter</a>
|
||||
<a class="reference external" href="tables.html">tables</a>, <a class="reference external" href="streams.html">streams</a>, <a class="reference external" href="hashes.html">hashes</a>, <a class="reference external" href="sets.html">sets</a>, <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="stream.html">stream</a>, <a class="reference external" href="taglib.html">taglib</a>, <a class="reference external" href="serialization.html">serialization</a>, <a class="reference external" href="private/internal.html">private/internal</a>, <a class="reference external" href="parser.html">parser</a>, <a class="reference external" href="presenter.html">presenter</a>
|
||||
</dl></section>
|
||||
<section id="7">
|
||||
<h1><a class="toc-backref" href="#7">Types</a></h1>
|
||||
@ -129,27 +162,27 @@
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L24"
|
||||
href="/yaml/dom.nim#L27"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="YamlNode"><a name="YamlNode"></a><pre><span class="Identifier">YamlNode</span> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Identifier">YamlNodeObj</span> <span class="Keyword">not</span> <span class="Keyword">nil</span></pre></dt>
|
||||
<dd>
|
||||
Represents a node in a <tt class="docutils literal"><span class="pre">YamlDocument</span></tt>.
|
||||
<a
|
||||
href="/yaml/dom.nim#L27"
|
||||
href="/yaml/dom.nim#L30"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="YamlNodeObj"><a name="YamlNodeObj"></a><pre><span class="Identifier">YamlNodeObj</span> <span class="Other">=</span> <span class="Keyword">object</span>
|
||||
<span class="Identifier">tag</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">string</span>
|
||||
<span class="Keyword">case</span> <span class="Identifier">kind</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">YamlNodeKind</span>
|
||||
<span class="Keyword">of</span> <span class="Identifier">yScalar</span><span class="Other">:</span> <span class="Identifier">content</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">string</span>
|
||||
<span class="Keyword">of</span> <span class="Identifier">ySequence</span><span class="Other">:</span> <span class="Identifier">children</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">YamlNode</span><span class="Other">]</span>
|
||||
<span class="Keyword">of</span> <span class="Identifier">yMapping</span><span class="Other">:</span> <span class="Identifier">pairs</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">key</span><span class="Other">,</span> <span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">]</span><span class="Other">]</span>
|
||||
<span class="Keyword">of</span> <span class="Identifier">ySequence</span><span class="Other">:</span> <span class="Identifier">elems</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">YamlNode</span><span class="Other">]</span>
|
||||
<span class="Keyword">of</span> <span class="Identifier">yMapping</span><span class="Other">:</span> <span class="Identifier">fields</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">TableRef</span><span class="Other">[</span><span class="Identifier">YamlNode</span><span class="Other">,</span> <span class="Identifier">YamlNode</span><span class="Other">]</span>
|
||||
</pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L30"
|
||||
href="/yaml/dom.nim#L33"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="YamlDocument"><a name="YamlDocument"></a><pre><span class="Identifier">YamlDocument</span> <span class="Other">=</span> <span class="Keyword">object</span>
|
||||
@ -158,7 +191,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Represents a YAML document.
|
||||
<a
|
||||
href="/yaml/dom.nim#L37"
|
||||
href="/yaml/dom.nim#L41"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -166,34 +199,55 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<section id="12">
|
||||
<h1><a class="toc-backref" href="#12">Procs</a></h1>
|
||||
<dl class="item">
|
||||
<dt id="hash"><a name="hash,YamlNode not nil"></a><pre><span class="Keyword">proc</span> <span class="Identifier">hash</span><span class="Other">(</span><span class="Identifier">o</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Hash</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L45"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="=="><a name="==,YamlNode not nil,YamlNode not nil"></a><pre><span class="Keyword">proc</span> <span class="Identifier">`==`</span><span class="Other">(</span><span class="Identifier">x</span><span class="Other">,</span> <span class="Identifier">y</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L94"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="$"><a name="$,YamlNode not nil"></a><pre><span class="Keyword">proc</span> <span class="Identifier">`$`</span><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L98"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="newYamlNode"><a name="newYamlNode,string,string"></a><pre><span class="Keyword">proc</span> <span class="Identifier">newYamlNode</span><span class="Other">(</span><span class="Identifier">content</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other">=</span> <span class="StringLit">"?"</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlNode</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L41"
|
||||
href="/yaml/dom.nim#L119"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="newYamlNode"><a name="newYamlNode,openArray[YamlNode not nil],string"></a><pre><span class="Keyword">proc</span> <span class="Identifier">newYamlNode</span><span class="Other">(</span><span class="Identifier">children</span><span class="Other">:</span> <span class="Identifier">openArray</span><span class="Other">[</span><span class="Identifier">YamlNode</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other">=</span> <span class="StringLit">"?"</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlNode</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
<dt id="newYamlNode"><a name="newYamlNode,openArray[YamlNode not nil],string"></a><pre><span class="Keyword">proc</span> <span class="Identifier">newYamlNode</span><span class="Other">(</span><span class="Identifier">elems</span><span class="Other">:</span> <span class="Identifier">openArray</span><span class="Other">[</span><span class="Identifier">YamlNode</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other">=</span> <span class="StringLit">"?"</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlNode</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
|
||||
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L122"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="newYamlNode"><a name="newYamlNode,openArray[],string"></a><pre><span class="Keyword">proc</span> <span class="Identifier">newYamlNode</span><span class="Other">(</span><span class="Identifier">fields</span><span class="Other">:</span> <span class="Identifier">openArray</span><span class="Other">[</span><span class="Other">(</span><span class="Identifier">YamlNode</span><span class="Other">,</span> <span class="Identifier">YamlNode</span><span class="Other">)</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other">=</span> <span class="StringLit">"?"</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlNode</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
<span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L44"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="newYamlNode"><a name="newYamlNode,openArray[tuple[YamlNode not nil,YamlNode not nil]],string"></a><pre><span class="Keyword">proc</span> <span class="Identifier">newYamlNode</span><span class="Other">(</span><span class="Identifier">pairs</span><span class="Other">:</span> <span class="Identifier">openArray</span><span class="Other">[</span><span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">key</span><span class="Other">,</span> <span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">]</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other">=</span> <span class="StringLit">"?"</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlNode</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
<span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L48"
|
||||
href="/yaml/dom.nim#L126"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="initYamlDoc"><a name="initYamlDoc,YamlNode not nil"></a><pre><span class="Keyword">proc</span> <span class="Identifier">initYamlDoc</span><span class="Other">(</span><span class="Identifier">root</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlDocument</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L52"
|
||||
href="/yaml/dom.nim#L130"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="compose"><a name="compose,YamlStream,TagLibrary"></a><pre><span class="Keyword">proc</span> <span class="Identifier">compose</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">tagLib</span><span class="Other">:</span> <span class="Identifier">TagLibrary</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlDocument</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -202,15 +256,15 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L99"
|
||||
href="/yaml/dom.nim#L184"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="loadDOM"><a name="loadDOM,"></a><pre><span class="Keyword">proc</span> <span class="Identifier">loadDOM</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">Stream</span> <span class="Operator">|</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlDocument</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
<dt id="loadDom"><a name="loadDom,"></a><pre><span class="Keyword">proc</span> <span class="Identifier">loadDom</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">Stream</span> <span class="Operator">|</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlDocument</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
<span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">YamlParserError</span><span class="Other">,</span> <span class="Identifier">YamlConstructionError</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L109"
|
||||
href="/yaml/dom.nim#L194"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="serialize"><a name="serialize,YamlDocument,TagLibrary,AnchorStyle"></a><pre><span class="Keyword">proc</span> <span class="Identifier">serialize</span><span class="Other">(</span><span class="Identifier">doc</span><span class="Other">:</span> <span class="Identifier">YamlDocument</span><span class="Other">;</span> <span class="Identifier">tagLib</span><span class="Other">:</span> <span class="Identifier">TagLibrary</span><span class="Other">;</span> <span class="Identifier">a</span><span class="Other">:</span> <span class="Identifier">AnchorStyle</span> <span class="Other">=</span> <span class="Identifier">asTidy</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStream</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -218,17 +272,93 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/dom.nim#L166"
|
||||
href="/yaml/dom.nim#L279"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="dumpDOM"><a name="dumpDOM,YamlDocument,Stream,AnchorStyle,PresentationOptions"></a><pre><span class="Keyword">proc</span> <span class="Identifier">dumpDOM</span><span class="Other">(</span><span class="Identifier">doc</span><span class="Other">:</span> <span class="Identifier">YamlDocument</span><span class="Other">;</span> <span class="Identifier">target</span><span class="Other">:</span> <span class="Identifier">Stream</span><span class="Other">;</span> <span class="Identifier">anchorStyle</span><span class="Other">:</span> <span class="Identifier">AnchorStyle</span> <span class="Other">=</span> <span class="Identifier">asTidy</span><span class="Other">;</span>
|
||||
<dt id="dumpDom"><a name="dumpDom,YamlDocument,Stream,AnchorStyle,PresentationOptions"></a><pre><span class="Keyword">proc</span> <span class="Identifier">dumpDom</span><span class="Other">(</span><span class="Identifier">doc</span><span class="Other">:</span> <span class="Identifier">YamlDocument</span><span class="Other">;</span> <span class="Identifier">target</span><span class="Other">:</span> <span class="Identifier">Stream</span><span class="Other">;</span> <span class="Identifier">anchorStyle</span><span class="Other">:</span> <span class="Identifier">AnchorStyle</span> <span class="Other">=</span> <span class="Identifier">asTidy</span><span class="Other">;</span>
|
||||
<span class="Identifier">options</span><span class="Other">:</span> <span class="Identifier">PresentationOptions</span> <span class="Other">=</span> <span class="Identifier">defaultPresentationOptions</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span>
|
||||
<span class="Identifier">YamlPresenterJsonError</span><span class="Other">,</span> <span class="Identifier">YamlPresenterOutputError</span><span class="Other">,</span> <span class="Identifier">YamlStreamError</span><span class="Other">]</span><span class="Other">,</span>
|
||||
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">WriteIOEffect</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Dump a YamlDocument as YAML character stream.
|
||||
<a
|
||||
href="/yaml/dom.nim#L185"
|
||||
href="/yaml/dom.nim#L298"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="[]"><a name="[],YamlNode not nil,int"></a><pre><span class="Keyword">proc</span> <span class="Identifier">`[]`</span><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlNode</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Get the node at index <em>i</em> from a sequence. <em>node</em> must be a <em>ySequence</em>.
|
||||
<a
|
||||
href="/yaml/dom.nim#L310"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="[]="><a name="[]=,YamlNode not nil,int,YamlNode not nil"></a><pre><span class="Keyword">proc</span> <span class="Identifier">`[]=`</span><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlNode</span><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">;</span> <span class="Identifier">val</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Set the node at index <em>i</em> of a sequence. <em>node</em> must be a <em>ySequence</em>.
|
||||
<a
|
||||
href="/yaml/dom.nim#L315"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="[]"><a name="[],YamlNode not nil,YamlNode not nil"></a><pre><span class="Keyword">proc</span> <span class="Identifier">`[]`</span><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlNode</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">KeyError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Get the value for a key in a mapping. <em>node</em> must be a <em>yMapping</em>.
|
||||
<a
|
||||
href="/yaml/dom.nim#L320"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="[]="><a name="[]=,YamlNode not nil,YamlNode not nil,YamlNode not nil"></a><pre><span class="Keyword">proc</span> <span class="Identifier">`[]=`</span><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">;</span> <span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Set the value for a key in a mapping. <em>node</em> must be a <em>yMapping</em>.
|
||||
<a
|
||||
href="/yaml/dom.nim#L325"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="[]"><a name="[],YamlNode not nil,string"></a><pre><span class="Keyword">proc</span> <span class="Identifier">`[]`</span><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlNode</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">KeyError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Get the value for a string key in a mapping. <em>node</em> must be a <em>yMapping</em>. This searches for a scalar key with content <em>key</em> and either no explicit tag or the explicit tag <tt class="docutils literal"><span class="pre">!!str</span></tt>.
|
||||
<a
|
||||
href="/yaml/dom.nim#L329"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="len"><a name="len,YamlNode not nil"></a><pre><span class="Keyword">proc</span> <span class="Identifier">len</span><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
If <em>node</em> is a <em>yMapping</em>, return the number of key-value pairs. If <em>node</em> is a <em>ySequence</em>, return the number of elements. Else, return <tt class="docutils literal"><span class="pre">0</span></tt>
|
||||
<a
|
||||
href="/yaml/dom.nim#L345"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
</dl></section>
|
||||
<section id="14">
|
||||
<h1><a class="toc-backref" href="#14">Iterators</a></h1>
|
||||
<dl class="item">
|
||||
<dt id="items"><a name="items.i,YamlNode not nil"></a><pre><span class="Keyword">iterator</span> <span class="Identifier">items</span><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlNode</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Iterates over all items of a sequence. <em>node</em> must be a <em>ySequence</em>.
|
||||
<a
|
||||
href="/yaml/dom.nim#L353"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="mitems"><a name="mitems.i,YamlNode not nil"></a><pre><span class="Keyword">iterator</span> <span class="Identifier">mitems</span><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlNode</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlNode</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Iterates over all items of a sequence. <em>node</em> must be a <em>ySequence</em>. Values can be modified.
|
||||
<a
|
||||
href="/yaml/dom.nim#L358"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="pairs"><a name="pairs.i,YamlNode not nil"></a><pre><span class="Keyword">iterator</span> <span class="Identifier">pairs</span><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">key</span><span class="Other">,</span> <span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">]</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Iterates over all key-value pairs of a mapping. <em>node</em> must be a <em>yMapping</em>.
|
||||
<a
|
||||
href="/yaml/dom.nim#L364"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="mpairs"><a name="mpairs.i,YamlNode not nil"></a><pre><span class="Keyword">iterator</span> <span class="Identifier">mpairs</span><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlNode</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">YamlNode</span><span class="Other">,</span> <span class="Identifier">value</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlNode</span><span class="Other">]</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
<span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">AssertionError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Iterates over all key-value pairs of a mapping. <em>node</em> must be a <em>yMapping</em>. Values can be modified.
|
||||
<a
|
||||
href="/yaml/dom.nim#L370"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -241,7 +371,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:29 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:35 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -92,7 +92,7 @@
|
||||
<section id="6">
|
||||
<h1><a class="toc-backref" href="#6">Imports</a></h1>
|
||||
<dl class="item">
|
||||
<a class="reference external" href="macros.html">macros</a>, <a class="reference external" href="../private/internal.html">../private/internal</a>
|
||||
<a class="reference external" href="macros.html">macros</a>, <a class="reference external" href="private/internal.html">private/internal</a>
|
||||
</dl></section>
|
||||
<section id="7">
|
||||
<h1><a class="toc-backref" href="#7">Types</a></h1>
|
||||
@ -127,7 +127,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Parse scalar string according to the RegEx table documented at <a class="reference external" href="#TypeHind">TypeHint</a>.
|
||||
<a
|
||||
href="/yaml/hints.nim#L261"
|
||||
href="/yaml/hints.nim#L264"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -140,7 +140,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:29 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:35 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -96,7 +96,7 @@
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:28 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:34 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -96,6 +96,10 @@
|
||||
title="parse(p: YamlParser; s: Stream): YamlStream"><wbr />parse</a></li>
|
||||
<li><a class="reference" href="#parse,YamlParser,string"
|
||||
title="parse(p: YamlParser; str: string): YamlStream"><wbr />parse</a></li>
|
||||
<li><a class="reference" href="#anchorName,YamlParser,AnchorId"
|
||||
title="anchorName(p: YamlParser; anchor: AnchorId): string"><wbr />anchor<wbr />Name</a></li>
|
||||
<li><a class="reference" href="#display,YamlParser,YamlStreamEvent"
|
||||
title="display(p: YamlParser; event: YamlStreamEvent): string"><wbr />display</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@ -110,7 +114,7 @@
|
||||
<section id="6">
|
||||
<h1><a class="toc-backref" href="#6">Imports</a></h1>
|
||||
<dl class="item">
|
||||
<a class="reference external" href="tables.html">tables</a>, <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="macros.html">macros</a>, <a class="reference external" href="streams.html">streams</a>, <a class="reference external" href="taglib.html">taglib</a>, <a class="reference external" href="stream.html">stream</a>, <a class="reference external" href="../private/lex.html">../private/lex</a>, <a class="reference external" href="../private/internal.html">../private/internal</a>
|
||||
<a class="reference external" href="tables.html">tables</a>, <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="macros.html">macros</a>, <a class="reference external" href="streams.html">streams</a>, <a class="reference external" href="taglib.html">taglib</a>, <a class="reference external" href="stream.html">stream</a>, <a class="reference external" href="private/lex.html">private/lex</a>, <a class="reference external" href="private/internal.html">private/internal</a>
|
||||
</dl></section>
|
||||
<section id="7">
|
||||
<h1><a class="toc-backref" href="#7">Types</a></h1>
|
||||
@ -187,7 +191,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Parse the given stream as YAML character stream.
|
||||
<a
|
||||
href="/yaml/parser.nim#L1034"
|
||||
href="/yaml/parser.nim#L1069"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="parse"><a name="parse,YamlParser,string"></a><pre><span class="Keyword">proc</span> <span class="Identifier">parse</span><span class="Other">(</span><span class="Identifier">p</span><span class="Other">:</span> <span class="Identifier">YamlParser</span><span class="Other">;</span> <span class="Identifier">str</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStream</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">YamlParserError</span><span class="Other">]</span><span class="Other">,</span>
|
||||
@ -195,7 +199,24 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Parse the given string as YAML character stream.
|
||||
<a
|
||||
href="/yaml/parser.nim#L1050"
|
||||
href="/yaml/parser.nim#L1085"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="anchorName"><a name="anchorName,YamlParser,AnchorId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">anchorName</span><span class="Other">(</span><span class="Identifier">p</span><span class="Other">:</span> <span class="Identifier">YamlParser</span><span class="Other">;</span> <span class="Identifier">anchor</span><span class="Other">:</span> <span class="Identifier">AnchorId</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Retrieve the textual representation of the given anchor as it occurred in the input (without the leading <cite>&</cite>). Returns the empty string for unknown anchors.
|
||||
<a
|
||||
href="/yaml/parser.nim#L1093"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="display"><a name="display,YamlParser,YamlStreamEvent"></a><pre><span class="Keyword">proc</span> <span class="Identifier">display</span><span class="Other">(</span><span class="Identifier">p</span><span class="Other">:</span> <span class="Identifier">YamlParser</span><span class="Other">;</span> <span class="Identifier">event</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">KeyError</span><span class="Other">]</span><span class="Other">,</span>
|
||||
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
<p>Generate a representation of the given event with proper visualization of anchor and tag (if any). The generated representation is conformant to the format used in the yaml test suite.</p>
|
||||
<p>This proc is an informed version of <tt class="docutils literal"><span class="pre">$</span></tt> on <tt class="docutils literal"><span class="pre">YamlStreamEvent</span></tt> which can properly display the anchor and tag name as it occurs in the input. However, it shall only be used while using the streaming API because after finishing the parsing of a document, the parser drops all information about anchor and tag names.</p>
|
||||
|
||||
<a
|
||||
href="/yaml/parser.nim#L1113"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -208,7 +229,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:29 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:35 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -116,12 +116,14 @@
|
||||
<li><a class="reference" href="#present,YamlStream,TagLibrary,PresentationOptions"
|
||||
title="present(s: var YamlStream; tagLib: TagLibrary;
|
||||
options: PresentationOptions = defaultPresentationOptions): string"><wbr />present</a></li>
|
||||
<li><a class="reference" href="#transform,,Stream,PresentationOptions"
|
||||
title="transform[](input: Stream | string; output: Stream;
|
||||
options: PresentationOptions = defaultPresentationOptions)"><wbr />transform</a></li>
|
||||
<li><a class="reference" href="#transform,,PresentationOptions"
|
||||
title="transform[](input: Stream | string;
|
||||
options: PresentationOptions = defaultPresentationOptions): string"><wbr />transform</a></li>
|
||||
<li><a class="reference" href="#transform,,Stream,PresentationOptions,bool"
|
||||
title="transform(input: Stream | string; output: Stream;
|
||||
options: PresentationOptions = defaultPresentationOptions;
|
||||
resolveToCoreYamlTags: bool = false)"><wbr />transform</a></li>
|
||||
<li><a class="reference" href="#transform,,PresentationOptions,bool"
|
||||
title="transform(input: Stream | string;
|
||||
options: PresentationOptions = defaultPresentationOptions;
|
||||
resolveToCoreYamlTags: bool = false): string"><wbr />transform</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@ -136,7 +138,7 @@
|
||||
<section id="6">
|
||||
<h1><a class="toc-backref" href="#6">Imports</a></h1>
|
||||
<dl class="item">
|
||||
<a class="reference external" href="streams.html">streams</a>, <a class="reference external" href="queues.html">queues</a>, <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="taglib.html">taglib</a>, <a class="reference external" href="stream.html">stream</a>, <a class="reference external" href="../private/internal.html">../private/internal</a>, <a class="reference external" href="hints.html">hints</a>, <a class="reference external" href="parser.html">parser</a>, <a class="reference external" href="stream.html">stream</a>
|
||||
<a class="reference external" href="streams.html">streams</a>, <a class="reference external" href="queues.html">queues</a>, <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="taglib.html">taglib</a>, <a class="reference external" href="stream.html">stream</a>, <a class="reference external" href="private/internal.html">private/internal</a>, <a class="reference external" href="hints.html">hints</a>, <a class="reference external" href="parser.html">parser</a>, <a class="reference external" href="stream.html">stream</a>
|
||||
</dl></section>
|
||||
<section id="7">
|
||||
<h1><a class="toc-backref" href="#7">Types</a></h1>
|
||||
@ -267,7 +269,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Convert <tt class="docutils literal"><span class="pre">s</span></tt> to a YAML character stream and write it to <tt class="docutils literal"><span class="pre">target</span></tt>.
|
||||
<a
|
||||
href="/yaml/presenter.nim#L714"
|
||||
href="/yaml/presenter.nim#L721"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="present"><a name="present,YamlStream,TagLibrary,PresentationOptions"></a><pre><span class="Keyword">proc</span> <span class="Identifier">present</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">tagLib</span><span class="Other">:</span> <span class="Identifier">TagLibrary</span><span class="Other">;</span>
|
||||
@ -277,25 +279,27 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Convert <tt class="docutils literal"><span class="pre">s</span></tt> to a YAML character stream and return it as string.
|
||||
<a
|
||||
href="/yaml/presenter.nim#L722"
|
||||
href="/yaml/presenter.nim#L729"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="transform"><a name="transform,,Stream,PresentationOptions"></a><pre><span class="Keyword">proc</span> <span class="Identifier">transform</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">input</span><span class="Other">:</span> <span class="Identifier">Stream</span> <span class="Operator">|</span> <span class="Identifier">string</span><span class="Other">;</span> <span class="Identifier">output</span><span class="Other">:</span> <span class="Identifier">Stream</span><span class="Other">;</span>
|
||||
<span class="Identifier">options</span><span class="Other">:</span> <span class="Identifier">PresentationOptions</span> <span class="Other">=</span> <span class="Identifier">defaultPresentationOptions</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span>
|
||||
<span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">YamlParserError</span><span class="Other">,</span> <span class="Identifier">YamlPresenterJsonError</span><span class="Other">,</span> <span class="Identifier">YamlPresenterOutputError</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="transform"><a name="transform,,Stream,PresentationOptions,bool"></a><pre><span class="Keyword">proc</span> <span class="Identifier">transform</span><span class="Other">(</span><span class="Identifier">input</span><span class="Other">:</span> <span class="Identifier">Stream</span> <span class="Operator">|</span> <span class="Identifier">string</span><span class="Other">;</span> <span class="Identifier">output</span><span class="Other">:</span> <span class="Identifier">Stream</span><span class="Other">;</span>
|
||||
<span class="Identifier">options</span><span class="Other">:</span> <span class="Identifier">PresentationOptions</span> <span class="Other">=</span> <span class="Identifier">defaultPresentationOptions</span><span class="Other">;</span>
|
||||
<span class="Identifier">resolveToCoreYamlTags</span><span class="Other">:</span> <span class="Identifier">bool</span> <span class="Other">=</span> <span class="Identifier">false</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span>
|
||||
<span class="Identifier">YamlParserError</span><span class="Other">,</span> <span class="Identifier">YamlPresenterJsonError</span><span class="Other">,</span> <span class="Identifier">YamlPresenterOutputError</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Parser <tt class="docutils literal"><span class="pre">input</span></tt> as YAML character stream and then dump it to <tt class="docutils literal"><span class="pre">output</span></tt> while resolving non-specific tags to the ones in the YAML core tag library.
|
||||
Parser <tt class="docutils literal"><span class="pre">input</span></tt> as YAML character stream and then dump it to <tt class="docutils literal"><span class="pre">output</span></tt> while resolving non-specific tags to the ones in the YAML core tag library. If <tt class="docutils literal"><span class="pre">resolveToCoreYamlTags</span></tt> is <tt class="docutils literal"><span class="pre">true</span></tt>, non-specific tags will be replaced by specific tags according to the YAML core schema.
|
||||
<a
|
||||
href="/yaml/presenter.nim#L771"
|
||||
href="/yaml/presenter.nim#L784"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="transform"><a name="transform,,PresentationOptions"></a><pre><span class="Keyword">proc</span> <span class="Identifier">transform</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">input</span><span class="Other">:</span> <span class="Identifier">Stream</span> <span class="Operator">|</span> <span class="Identifier">string</span><span class="Other">;</span>
|
||||
<span class="Identifier">options</span><span class="Other">:</span> <span class="Identifier">PresentationOptions</span> <span class="Other">=</span> <span class="Identifier">defaultPresentationOptions</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span>
|
||||
<span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">YamlParserError</span><span class="Other">,</span> <span class="Identifier">YamlPresenterJsonError</span><span class="Other">,</span> <span class="Identifier">YamlPresenterOutputError</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="transform"><a name="transform,,PresentationOptions,bool"></a><pre><span class="Keyword">proc</span> <span class="Identifier">transform</span><span class="Other">(</span><span class="Identifier">input</span><span class="Other">:</span> <span class="Identifier">Stream</span> <span class="Operator">|</span> <span class="Identifier">string</span><span class="Other">;</span>
|
||||
<span class="Identifier">options</span><span class="Other">:</span> <span class="Identifier">PresentationOptions</span> <span class="Other">=</span> <span class="Identifier">defaultPresentationOptions</span><span class="Other">;</span>
|
||||
<span class="Identifier">resolveToCoreYamlTags</span><span class="Other">:</span> <span class="Identifier">bool</span> <span class="Other">=</span> <span class="Identifier">false</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span>
|
||||
<span class="Identifier">YamlParserError</span><span class="Other">,</span> <span class="Identifier">YamlPresenterJsonError</span><span class="Other">,</span> <span class="Identifier">YamlPresenterOutputError</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Parser <tt class="docutils literal"><span class="pre">input</span></tt> as YAML character stream, resolves non-specific tags to the ones in the YAML core tag library, and then returns a serialized YAML string that represents the stream.
|
||||
Parser <tt class="docutils literal"><span class="pre">input</span></tt> as YAML character stream, resolves non-specific tags to the ones in the YAML core tag library, and then returns a serialized YAML string that represents the stream. If <tt class="docutils literal"><span class="pre">resolveToCoreYamlTags</span></tt> is <tt class="docutils literal"><span class="pre">true</span></tt>, non-specific tags will be replaced by specific tags according to the YAML core schema.
|
||||
<a
|
||||
href="/yaml/presenter.nim#L780"
|
||||
href="/yaml/presenter.nim#L795"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -308,7 +312,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:30 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:36 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -68,13 +68,16 @@
|
||||
<ul class="simple simple-toc-section">
|
||||
<li><a class="reference" href="#SerializationContext"
|
||||
title="SerializationContext = ref object
|
||||
refs*: Table[pointer, AnchorId]
|
||||
when not false:
|
||||
refs*: Table[pointer, AnchorId]
|
||||
|
||||
style: AnchorStyle
|
||||
nextAnchorId*: AnchorId
|
||||
put*: proc (e: YamlStreamEvent)"><wbr />Serialization<wbr />Context</a></li>
|
||||
<li><a class="reference" href="#ConstructionContext"
|
||||
title="ConstructionContext = ref object
|
||||
refs*: Table[AnchorId, pointer]"><wbr />Construction<wbr />Context</a></li>
|
||||
when not false:
|
||||
refs*: Table[AnchorId, pointer]"><wbr />Construction<wbr />Context</a></li>
|
||||
<li><a class="reference" href="#YamlConstructionError"
|
||||
title="YamlConstructionError = object of YamlLoadingError"><wbr />Yaml<wbr />Construction<wbr />Error</a></li>
|
||||
|
||||
@ -88,7 +91,7 @@
|
||||
<li><a class="reference" href="#newSerializationContext,AnchorStyle,proc(YamlStreamEvent)"
|
||||
title="newSerializationContext(s: AnchorStyle; putImpl: proc (e: YamlStreamEvent)): SerializationContext"><wbr />new<wbr />Serialization<wbr />Context</a></li>
|
||||
<li><a class="reference" href="#yamlTag,typedesc[string]"
|
||||
title="yamlTag[](T: typedesc[string]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T: typedesc[string]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#constructObject,YamlStream,ConstructionContext,string"
|
||||
title="constructObject(s: var YamlStream; c: ConstructionContext; result: var string)"><wbr />construct<wbr />Object</a></li>
|
||||
<li><a class="reference" href="#representObject,string,TagStyle,SerializationContext,TagId"
|
||||
@ -104,8 +107,8 @@
|
||||
<li><a class="reference" href="#representObject,int,TagStyle,SerializationContext,TagId"
|
||||
title="representObject(value: int; tagStyle: TagStyle; c: SerializationContext; tag: TagId)"><wbr />represent<wbr />Object</a></li>
|
||||
<li><a class="reference" href="#constructObject,YamlStream,ConstructionContext,T_2"
|
||||
title="constructObject[T: uint8 | uint16 | uint32 | uint64](s: var YamlStream;
|
||||
c: ConstructionContext; result: var T)"><wbr />construct<wbr />Object</a></li>
|
||||
title="constructObject[T: DefiniteUIntTypes](s: var YamlStream; c: ConstructionContext;
|
||||
result: var T)"><wbr />construct<wbr />Object</a></li>
|
||||
<li><a class="reference" href="#constructObject,YamlStream,ConstructionContext,uint"
|
||||
title="constructObject(s: var YamlStream; c: ConstructionContext; result: var uint)"><wbr />construct<wbr />Object</a></li>
|
||||
<li><a class="reference" href="#representObject,T,TagStyle,SerializationContext,TagId_2"
|
||||
@ -120,7 +123,7 @@
|
||||
title="representObject[T: float | float32 | float64](value: T; ts: TagStyle;
|
||||
c: SerializationContext; tag: TagId)"><wbr />represent<wbr />Object</a></li>
|
||||
<li><a class="reference" href="#yamlTag,typedesc[bool]"
|
||||
title="yamlTag[](T: typedesc[bool]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T: typedesc[bool]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#constructObject,YamlStream,ConstructionContext,bool"
|
||||
title="constructObject(s: var YamlStream; c: ConstructionContext; result: var bool)"><wbr />construct<wbr />Object</a></li>
|
||||
<li><a class="reference" href="#representObject,bool,TagStyle,SerializationContext,TagId"
|
||||
@ -130,7 +133,7 @@
|
||||
<li><a class="reference" href="#representObject,char,TagStyle,SerializationContext,TagId"
|
||||
title="representObject(value: char; ts: TagStyle; c: SerializationContext; tag: TagId)"><wbr />represent<wbr />Object</a></li>
|
||||
<li><a class="reference" href="#yamlTag,typedesc[Time]"
|
||||
title="yamlTag[](T: typedesc[Time]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T: typedesc[Time]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#constructObject,YamlStream,ConstructionContext,Time"
|
||||
title="constructObject(s: var YamlStream; c: ConstructionContext; result: var Time)"><wbr />construct<wbr />Object</a></li>
|
||||
<li><a class="reference" href="#representObject,Time,TagStyle,SerializationContext,TagId"
|
||||
@ -171,9 +174,12 @@
|
||||
title="representObject[K, V](value: OrderedTable[K, V]; ts: TagStyle;
|
||||
c: SerializationContext; tag: TagId)"><wbr />represent<wbr />Object</a></li>
|
||||
<li><a class="reference" href="#yamlTag,typedesc[]"
|
||||
title="yamlTag[](T: typedesc[object | enum]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T: typedesc[object | enum]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#yamlTag,typedesc[]_2"
|
||||
title="yamlTag[](T: typedesc[tuple]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T: typedesc[tuple]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#constructObjectDefault,YamlStream,ConstructionContext,O"
|
||||
title="constructObjectDefault[O: object | tuple](s: var YamlStream; c: ConstructionContext;
|
||||
result: var O)"><wbr />construct<wbr />Object<wbr />Default</a></li>
|
||||
<li><a class="reference" href="#constructObject,YamlStream,ConstructionContext,O"
|
||||
title="constructObject[O: object | tuple](s: var YamlStream; c: ConstructionContext;
|
||||
result: var O)"><wbr />construct<wbr />Object</a></li>
|
||||
@ -225,11 +231,13 @@
|
||||
<a class="reference reference-toplevel" href="#16" id="66">Macros</a>
|
||||
<ul class="simple simple-toc-section">
|
||||
<li><a class="reference" href="#markAsTransient.m,typedesc,untyped"
|
||||
title="markAsTransient[](t: typedesc; field: untyped): typed"><wbr />mark<wbr />As<wbr />Transient</a></li>
|
||||
title="markAsTransient(t: typedesc; field: untyped): typed"><wbr />mark<wbr />As<wbr />Transient</a></li>
|
||||
<li><a class="reference" href="#setDefaultValue.m,typedesc,untyped,typed"
|
||||
title="setDefaultValue[](t: typedesc; field: untyped; value: typed): typed"><wbr />set<wbr />Default<wbr />Value</a></li>
|
||||
title="setDefaultValue(t: typedesc; field: untyped; value: typed): typed"><wbr />set<wbr />Default<wbr />Value</a></li>
|
||||
<li><a class="reference" href="#ignoreInputKey.m,typedesc,"
|
||||
title="ignoreInputKey[](t: typedesc; name: string{lit}): typed"><wbr />ignore<wbr />Input<wbr />Key</a></li>
|
||||
title="ignoreInputKey(t: typedesc; name: string{lit}): typed"><wbr />ignore<wbr />Input<wbr />Key</a></li>
|
||||
<li><a class="reference" href="#ignoreUnknownKeys.m,typedesc"
|
||||
title="ignoreUnknownKeys(t: typedesc): typed"><wbr />ignore<wbr />Unknown<wbr />Keys</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@ -237,11 +245,11 @@
|
||||
<a class="reference reference-toplevel" href="#17" id="67">Templates</a>
|
||||
<ul class="simple simple-toc-section">
|
||||
<li><a class="reference" href="#presentTag.t,typedesc,TagStyle"
|
||||
title="presentTag[](t: typedesc; ts: TagStyle): TagId"><wbr />present<wbr />Tag</a></li>
|
||||
title="presentTag(t: typedesc; ts: TagStyle): TagId"><wbr />present<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#constructScalarItem.t,YamlStream,untyped,typedesc,untyped"
|
||||
title="constructScalarItem[](s: var YamlStream; i: untyped; t: typedesc; content: untyped)"><wbr />construct<wbr />Scalar<wbr />Item</a></li>
|
||||
title="constructScalarItem(s: var YamlStream; i: untyped; t: typedesc; content: untyped)"><wbr />construct<wbr />Scalar<wbr />Item</a></li>
|
||||
<li><a class="reference" href="#markAsImplicit.t,typedesc"
|
||||
title="markAsImplicit[](t: typedesc): typed"><wbr />mark<wbr />As<wbr />Implicit</a></li>
|
||||
title="markAsImplicit(t: typedesc): typed"><wbr />mark<wbr />As<wbr />Implicit</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@ -257,13 +265,15 @@
|
||||
<section id="6">
|
||||
<h1><a class="toc-backref" href="#6">Imports</a></h1>
|
||||
<dl class="item">
|
||||
<a class="reference external" href="tables.html">tables</a>, <a class="reference external" href="typetraits.html">typetraits</a>, <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="macros.html">macros</a>, <a class="reference external" href="streams.html">streams</a>, <a class="reference external" href="times.html">times</a>, <a class="reference external" href="parser.html">parser</a>, <a class="reference external" href="taglib.html">taglib</a>, <a class="reference external" href="presenter.html">presenter</a>, <a class="reference external" href="stream.html">stream</a>, <a class="reference external" href="../private/internal.html">../private/internal</a>, <a class="reference external" href="hints.html">hints</a>
|
||||
<a class="reference external" href="tables.html">tables</a>, <a class="reference external" href="typetraits.html">typetraits</a>, <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="macros.html">macros</a>, <a class="reference external" href="streams.html">streams</a>, <a class="reference external" href="times.html">times</a>, <a class="reference external" href="parseutils.html">parseutils</a>, <a class="reference external" href="parser.html">parser</a>, <a class="reference external" href="taglib.html">taglib</a>, <a class="reference external" href="presenter.html">presenter</a>, <a class="reference external" href="stream.html">stream</a>, <a class="reference external" href="private/internal.html">private/internal</a>, <a class="reference external" href="hints.html">hints</a>
|
||||
</dl></section>
|
||||
<section id="7">
|
||||
<h1><a class="toc-backref" href="#7">Types</a></h1>
|
||||
<dl class="item">
|
||||
<dt id="SerializationContext"><a name="SerializationContext"></a><pre><span class="Identifier">SerializationContext</span> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span>
|
||||
<span class="Identifier">refs</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">Table</span><span class="Other">[</span><span class="Identifier">pointer</span><span class="Other">,</span> <span class="Identifier">AnchorId</span><span class="Other">]</span>
|
||||
<span class="Keyword">when</span> <span class="Keyword">not</span> <span class="DecNumber">false</span><span class="Other">:</span>
|
||||
<span class="Identifier">refs</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">Table</span><span class="Other">[</span><span class="Identifier">pointer</span><span class="Other">,</span> <span class="Identifier">AnchorId</span><span class="Other">]</span>
|
||||
|
||||
<span class="Identifier">style</span><span class="Other">:</span> <span class="Identifier">AnchorStyle</span>
|
||||
<span class="Identifier">nextAnchorId</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">AnchorId</span>
|
||||
<span class="Identifier">put</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">e</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">closure</span></div><span class="Other pragmaend">.}</span>
|
||||
@ -275,12 +285,14 @@ href="/yaml/serialization.nim#L26"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="ConstructionContext"><a name="ConstructionContext"></a><pre><span class="Identifier">ConstructionContext</span> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span>
|
||||
<span class="Identifier">refs</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">Table</span><span class="Other">[</span><span class="Identifier">AnchorId</span><span class="Other">,</span> <span class="Identifier">pointer</span><span class="Other">]</span>
|
||||
</pre></dt>
|
||||
<span class="Keyword">when</span> <span class="Keyword">not</span> <span class="DecNumber">false</span><span class="Other">:</span>
|
||||
<span class="Identifier">refs</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">Table</span><span class="Other">[</span><span class="Identifier">AnchorId</span><span class="Other">,</span> <span class="Identifier">pointer</span><span class="Other">]</span>
|
||||
|
||||
</pre></dt>
|
||||
<dd>
|
||||
Context information for the process of constructing Nim values from YAML.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L33"
|
||||
href="/yaml/serialization.nim#L34"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="YamlConstructionError"><a name="YamlConstructionError"></a><pre><span class="Identifier">YamlConstructionError</span> <span class="Other">=</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <span class="Identifier">YamlLoadingError</span>
|
||||
@ -288,7 +300,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Exception that may be raised when constructing data objects from a <a class="reference external" href="#YamlStream">YamlStream</a>. The fields <tt class="docutils literal"><span class="pre">line</span></tt>, <tt class="docutils literal"><span class="pre">column</span></tt> and <tt class="docutils literal"><span class="pre">lineContent</span></tt> are only available if the costructing proc also does parsing, because otherwise this information is not available to the costruction proc.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L37"
|
||||
href="/yaml/serialization.nim#L39"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -300,7 +312,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L87"
|
||||
href="/yaml/serialization.nim#L89"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="newSerializationContext"><a name="newSerializationContext,AnchorStyle,proc(YamlStreamEvent)"></a><pre><span class="Keyword">proc</span> <span class="Identifier">newSerializationContext</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">AnchorStyle</span><span class="Other">;</span> <span class="Identifier">putImpl</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">e</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -308,14 +320,14 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L91"
|
||||
href="/yaml/serialization.nim#L96"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[string]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">noSideEffect</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[string]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">noSideEffect</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L145"
|
||||
href="/yaml/serialization.nim#L154"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,string"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">string</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -324,7 +336,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
costructs a string from a YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L148"
|
||||
href="/yaml/serialization.nim#L157"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,string,TagStyle,SerializationContext,TagId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">TagId</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -332,7 +344,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represents a string as YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L155"
|
||||
href="/yaml/serialization.nim#L164"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,T"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">int8</span> <span class="Operator">|</span> <span class="Identifier">int16</span> <span class="Operator">|</span> <span class="Identifier">int32</span> <span class="Operator">|</span> <span class="Identifier">int64</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span>
|
||||
@ -341,7 +353,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
constructs an integer value from a YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L183"
|
||||
href="/yaml/serialization.nim#L192"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,int"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">int</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -350,7 +362,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
constructs an integer of architecture-defined length by loading it into int32 and then converting it.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L195"
|
||||
href="/yaml/serialization.nim#L204"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,T,TagStyle,SerializationContext,TagId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">int8</span> <span class="Operator">|</span> <span class="Identifier">int16</span> <span class="Operator">|</span> <span class="Identifier">int32</span> <span class="Operator">|</span> <span class="Identifier">int64</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span>
|
||||
@ -358,7 +370,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represents an integer value as YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L204"
|
||||
href="/yaml/serialization.nim#L213"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,int,TagStyle,SerializationContext,TagId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">;</span> <span class="Identifier">tagStyle</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">;</span>
|
||||
@ -367,16 +379,15 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represent an integer of architecture-defined length by casting it to int32. on 64-bit systems, this may cause a RangeError.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L209"
|
||||
href="/yaml/serialization.nim#L218"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,T_2"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">uint8</span> <span class="Operator">|</span> <span class="Identifier">uint16</span> <span class="Operator">|</span> <span class="Identifier">uint32</span> <span class="Operator">|</span> <span class="Identifier">uint64</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span>
|
||||
<span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">T</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">YamlConstructionError</span><span class="Other">,</span>
|
||||
<span class="Identifier">YamlStreamError</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,T_2"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">DefiniteUIntTypes</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span>
|
||||
<span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">T</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">YamlConstructionError</span><span class="Other">,</span> <span class="Identifier">YamlStreamError</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
construct an unsigned integer value from a YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L222"
|
||||
href="/yaml/serialization.nim#L236"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,uint"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">uint</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -385,7 +396,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represent an unsigned integer of architecture-defined length by loading it into uint32 and then converting it.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L233"
|
||||
href="/yaml/serialization.nim#L247"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,T,TagStyle,SerializationContext,TagId_2"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">uint8</span> <span class="Operator">|</span> <span class="Identifier">uint16</span> <span class="Operator">|</span> <span class="Identifier">uint32</span> <span class="Operator">|</span> <span class="Identifier">uint64</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span>
|
||||
@ -393,7 +404,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represents an unsigned integer value as YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L247"
|
||||
href="/yaml/serialization.nim#L261"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,uint,TagStyle,SerializationContext,TagId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">uint</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">TagId</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -401,7 +412,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represent an unsigned integer of architecture-defined length by casting it to int32. on 64-bit systems, this may cause a RangeError.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L252"
|
||||
href="/yaml/serialization.nim#L266"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,T_3"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">float</span> <span class="Operator">|</span> <span class="Identifier">float32</span> <span class="Operator">|</span> <span class="Identifier">float64</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span>
|
||||
@ -410,7 +421,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
construct a float value from a YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L262"
|
||||
href="/yaml/serialization.nim#L276"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,T,TagStyle,SerializationContext,TagId_3"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">float</span> <span class="Operator">|</span> <span class="Identifier">float32</span> <span class="Operator">|</span> <span class="Identifier">float64</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span>
|
||||
@ -418,14 +429,14 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represents a float value as YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L281"
|
||||
href="/yaml/serialization.nim#L295"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[bool]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">bool</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[bool]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">bool</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L290"
|
||||
href="/yaml/serialization.nim#L304"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,bool"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">bool</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -434,7 +445,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
constructs a bool value from a YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L292"
|
||||
href="/yaml/serialization.nim#L306"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,bool,TagStyle,SerializationContext,TagId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">bool</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">TagId</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -442,7 +453,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represents a bool value as a YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L304"
|
||||
href="/yaml/serialization.nim#L318"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,char"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">char</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -451,7 +462,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
constructs a char value from a YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L309"
|
||||
href="/yaml/serialization.nim#L323"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,char,TagStyle,SerializationContext,TagId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">char</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">TagId</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -459,14 +470,14 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represents a char value as YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L319"
|
||||
href="/yaml/serialization.nim#L333"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[Time]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">Time</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[Time]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">Time</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L324"
|
||||
href="/yaml/serialization.nim#L338"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,Time"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">Time</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -475,7 +486,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L326"
|
||||
href="/yaml/serialization.nim#L340"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,Time,TagStyle,SerializationContext,TagId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">Time</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">TagId</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -483,21 +494,21 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L385"
|
||||
href="/yaml/serialization.nim#L399"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[seq[I]]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Identifier">I</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">I</span><span class="Other">]</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L390"
|
||||
href="/yaml/serialization.nim#L404"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[set[I]]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Identifier">I</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">set</span><span class="Other">[</span><span class="Identifier">I</span><span class="Other">]</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L394"
|
||||
href="/yaml/serialization.nim#L408"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,seq[T]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -505,7 +516,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
constructs a Nim seq from a YAML sequence
|
||||
<a
|
||||
href="/yaml/serialization.nim#L398"
|
||||
href="/yaml/serialization.nim#L412"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,set[T]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">set</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -513,7 +524,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
constructs a Nim seq from a YAML sequence
|
||||
<a
|
||||
href="/yaml/serialization.nim#L412"
|
||||
href="/yaml/serialization.nim#L426"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,,TagStyle,SerializationContext,TagId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span> <span class="Operator">|</span> <span class="Identifier">set</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">;</span>
|
||||
@ -521,14 +532,14 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represents a Nim seq as YAML sequence
|
||||
<a
|
||||
href="/yaml/serialization.nim#L426"
|
||||
href="/yaml/serialization.nim#L440"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[array[I,V]]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Identifier">I</span><span class="Other">,</span> <span class="Identifier">V</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">array</span><span class="Other">[</span><span class="Identifier">I</span><span class="Other">,</span> <span class="Identifier">V</span><span class="Other">]</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L435"
|
||||
href="/yaml/serialization.nim#L449"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,array[I,T]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">[</span><span class="Identifier">I</span><span class="Other">,</span> <span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span>
|
||||
@ -537,7 +548,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
constructs a Nim array from a YAML sequence
|
||||
<a
|
||||
href="/yaml/serialization.nim#L441"
|
||||
href="/yaml/serialization.nim#L455"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,array[I,T],TagStyle,SerializationContext,TagId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">[</span><span class="Identifier">I</span><span class="Other">,</span> <span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">array</span><span class="Other">[</span><span class="Identifier">I</span><span class="Other">,</span> <span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">;</span>
|
||||
@ -545,14 +556,14 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represents a Nim array as YAML sequence
|
||||
<a
|
||||
href="/yaml/serialization.nim#L457"
|
||||
href="/yaml/serialization.nim#L471"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[Table[K,V]]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">,</span> <span class="Identifier">V</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">Table</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">,</span> <span class="Identifier">V</span><span class="Other">]</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L466"
|
||||
href="/yaml/serialization.nim#L480"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,Table[K,V]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">,</span> <span class="Identifier">V</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span>
|
||||
@ -561,7 +572,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
constructs a Nim Table from a YAML mapping
|
||||
<a
|
||||
href="/yaml/serialization.nim#L475"
|
||||
href="/yaml/serialization.nim#L489"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,Table[K,V],TagStyle,SerializationContext,TagId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">,</span> <span class="Identifier">V</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">Table</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">,</span> <span class="Identifier">V</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">;</span>
|
||||
@ -569,14 +580,14 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represents a Nim Table as YAML mapping
|
||||
<a
|
||||
href="/yaml/serialization.nim#L494"
|
||||
href="/yaml/serialization.nim#L508"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[OrderedTable[K,V]]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">,</span> <span class="Identifier">V</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">OrderedTable</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">,</span> <span class="Identifier">V</span><span class="Other">]</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L504"
|
||||
href="/yaml/serialization.nim#L518"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,OrderedTable[K,V]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">,</span> <span class="Identifier">V</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span>
|
||||
@ -585,7 +596,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
constructs a Nim OrderedTable from a YAML mapping
|
||||
<a
|
||||
href="/yaml/serialization.nim#L514"
|
||||
href="/yaml/serialization.nim#L528"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,OrderedTable[K,V],TagStyle,SerializationContext,TagId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">,</span> <span class="Identifier">V</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">OrderedTable</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">,</span> <span class="Identifier">V</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span>
|
||||
@ -593,30 +604,39 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L539"
|
||||
href="/yaml/serialization.nim#L553"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Keyword">object</span> <span class="Operator">|</span> <span class="Keyword">enum</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Keyword">object</span> <span class="Operator">|</span> <span class="Keyword">enum</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L550"
|
||||
href="/yaml/serialization.nim#L564"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[]_2"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Keyword">tuple</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[]_2"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Keyword">tuple</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L556"
|
||||
href="/yaml/serialization.nim#L570"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObjectDefault"><a name="constructObjectDefault,YamlStream,ConstructionContext,O"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObjectDefault</span><span class="Other">[</span><span class="Identifier">O</span><span class="Other">:</span> <span class="Keyword">object</span> <span class="Operator">|</span> <span class="Keyword">tuple</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span>
|
||||
<span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">O</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">YamlConstructionError</span><span class="Other">,</span>
|
||||
<span class="Identifier">YamlStreamError</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Constructs a Nim object or tuple from a YAML mapping. This is the default implementation for custom objects and tuples and should not be redefined. If you are adding a custom constructObject() implementation, you can use this proc to call the default implementation within it.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L836"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,O"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">[</span><span class="Identifier">O</span><span class="Other">:</span> <span class="Keyword">object</span> <span class="Operator">|</span> <span class="Keyword">tuple</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span>
|
||||
<span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">O</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
<span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">YamlConstructionError</span><span class="Other">,</span> <span class="Identifier">YamlStreamError</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
constructs a Nim object or tuple from a YAML mapping
|
||||
Overridable default implementation for custom object and tuple types
|
||||
<a
|
||||
href="/yaml/serialization.nim#L800"
|
||||
href="/yaml/serialization.nim#L910"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,O,TagStyle,SerializationContext,TagId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">[</span><span class="Identifier">O</span><span class="Other">:</span> <span class="Keyword">object</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">O</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">;</span>
|
||||
@ -624,7 +644,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represents a Nim object or tuple as YAML mapping
|
||||
<a
|
||||
href="/yaml/serialization.nim#L943"
|
||||
href="/yaml/serialization.nim#L992"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,O,TagStyle,SerializationContext,TagId_2"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">[</span><span class="Identifier">O</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">O</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">;</span>
|
||||
@ -632,7 +652,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L953"
|
||||
href="/yaml/serialization.nim#L1002"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructObject"><a name="constructObject,YamlStream,ConstructionContext,O_2"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructObject</span><span class="Other">[</span><span class="Identifier">O</span><span class="Other">:</span> <span class="Keyword">enum</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">O</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -640,7 +660,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
constructs a Nim enum from a YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L965"
|
||||
href="/yaml/serialization.nim#L1014"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representObject"><a name="representObject,O,TagStyle,SerializationContext,TagId_3"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representObject</span><span class="Other">[</span><span class="Identifier">O</span><span class="Other">:</span> <span class="Keyword">enum</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">O</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">;</span>
|
||||
@ -648,14 +668,14 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
represents a Nim enum as YAML scalar
|
||||
<a
|
||||
href="/yaml/serialization.nim#L979"
|
||||
href="/yaml/serialization.nim#L1028"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,typedesc[ref.O]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Identifier">O</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Keyword">ref</span> <span class="Identifier">O</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L984"
|
||||
href="/yaml/serialization.nim#L1033"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructChild"><a name="constructChild,YamlStream,ConstructionContext,T"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructChild</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">T</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -663,7 +683,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Constructs an arbitrary Nim value from a part of a YAML stream. The stream will advance until after the finishing token that was used for constructing the value. The <tt class="docutils literal"><span class="pre">ConstructionContext</span></tt> is needed for potential child objects which may be refs.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1028"
|
||||
href="/yaml/serialization.nim#L1077"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructChild"><a name="constructChild,YamlStream,ConstructionContext,string"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructChild</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">string</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -672,7 +692,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Constructs a Nim value that is a string from a part of a YAML stream. This specialization takes care of possible nil strings.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1092"
|
||||
href="/yaml/serialization.nim#L1141"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructChild"><a name="constructChild,YamlStream,ConstructionContext,seq[T]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructChild</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -680,7 +700,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Constructs a Nim value that is a string from a part of a YAML stream. This specialization takes care of possible nil seqs.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1107"
|
||||
href="/yaml/serialization.nim#L1156"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructChild"><a name="constructChild,YamlStream,ConstructionContext,ref.O"></a><pre><span class="Keyword">proc</span> <span class="Identifier">constructChild</span><span class="Other">[</span><span class="Identifier">O</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">ConstructionContext</span><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Keyword">ref</span> <span class="Identifier">O</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -688,7 +708,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Constructs an arbitrary Nim value from a part of a YAML stream. The stream will advance until after the finishing token that was used for constructing the value. The object may be constructed from an alias node which will be resolved using the <tt class="docutils literal"><span class="pre">ConstructionContext</span></tt>.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1122"
|
||||
href="/yaml/serialization.nim#L1188"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representChild"><a name="representChild,string,TagStyle,SerializationContext"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representChild</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span>
|
||||
@ -696,35 +716,35 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Represents a Nim string. Supports nil strings.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1155"
|
||||
href="/yaml/serialization.nim#L1227"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representChild"><a name="representChild,seq[T],TagStyle,SerializationContext"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representChild</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">)</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1159"
|
||||
href="/yaml/serialization.nim#L1235"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representChild"><a name="representChild,ref.O,TagStyle,SerializationContext"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representChild</span><span class="Other">[</span><span class="Identifier">O</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Keyword">ref</span> <span class="Identifier">O</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Represents an arbitrary Nim reference value as YAML object. The object may be represented as alias node if it is already present in the <tt class="docutils literal"><span class="pre">SerializationContext</span></tt>.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1163"
|
||||
href="/yaml/serialization.nim#L1239"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="representChild"><a name="representChild,O,TagStyle,SerializationContext"></a><pre><span class="Keyword">proc</span> <span class="Identifier">representChild</span><span class="Other">[</span><span class="Identifier">O</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">O</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">SerializationContext</span><span class="Other">)</span></pre></dt>
|
||||
<dd>
|
||||
Represents an arbitrary Nim object as YAML object.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1200"
|
||||
href="/yaml/serialization.nim#L1294"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="construct"><a name="construct,YamlStream,T"></a><pre><span class="Keyword">proc</span> <span class="Identifier">construct</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">target</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">T</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">YamlStreamError</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Constructs a Nim value from a YAML stream.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1214"
|
||||
href="/yaml/serialization.nim#L1308"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="load"><a name="load,,K"></a><pre><span class="Keyword">proc</span> <span class="Identifier">load</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">input</span><span class="Other">:</span> <span class="Identifier">Stream</span> <span class="Operator">|</span> <span class="Identifier">string</span><span class="Other">;</span> <span class="Identifier">target</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">K</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -732,21 +752,21 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Loads a Nim value from a YAML character stream.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1238"
|
||||
href="/yaml/serialization.nim#L1332"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="loadMultiDoc"><a name="loadMultiDoc,,seq[K]"></a><pre><span class="Keyword">proc</span> <span class="Identifier">loadMultiDoc</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">input</span><span class="Other">:</span> <span class="Identifier">Stream</span> <span class="Operator">|</span> <span class="Identifier">string</span><span class="Other">;</span> <span class="Identifier">target</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">]</span><span class="Other">)</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1251"
|
||||
href="/yaml/serialization.nim#L1345"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="represent"><a name="represent,T,TagStyle,AnchorStyle"></a><pre><span class="Keyword">proc</span> <span class="Identifier">represent</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span> <span class="Other">=</span> <span class="Identifier">tsRootOnly</span><span class="Other">;</span> <span class="Identifier">a</span><span class="Other">:</span> <span class="Identifier">AnchorStyle</span> <span class="Other">=</span> <span class="Identifier">asTidy</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStream</span></pre></dt>
|
||||
<dd>
|
||||
Represents a Nim value as <tt class="docutils literal"><span class="pre">YamlStream</span></tt>
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1276"
|
||||
href="/yaml/serialization.nim#L1374"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="dump"><a name="dump,K,Stream,TagStyle,AnchorStyle,PresentationOptions"></a><pre><span class="Keyword">proc</span> <span class="Identifier">dump</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">K</span><span class="Other">;</span> <span class="Identifier">target</span><span class="Other">:</span> <span class="Identifier">Stream</span><span class="Other">;</span> <span class="Identifier">tagStyle</span><span class="Other">:</span> <span class="Identifier">TagStyle</span> <span class="Other">=</span> <span class="Identifier">tsRootOnly</span><span class="Other">;</span>
|
||||
@ -756,7 +776,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Dump a Nim value as YAML character stream.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1295"
|
||||
href="/yaml/serialization.nim#L1393"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="dump"><a name="dump,K,TagStyle,AnchorStyle,PresentationOptions"></a><pre><span class="Keyword">proc</span> <span class="Identifier">dump</span><span class="Other">[</span><span class="Identifier">K</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">K</span><span class="Other">;</span> <span class="Identifier">tagStyle</span><span class="Other">:</span> <span class="Identifier">TagStyle</span> <span class="Other">=</span> <span class="Identifier">tsRootOnly</span><span class="Other">;</span>
|
||||
@ -765,7 +785,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Dump a Nim value as YAML into a string
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1308"
|
||||
href="/yaml/serialization.nim#L1406"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -773,25 +793,53 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<section id="16">
|
||||
<h1><a class="toc-backref" href="#16">Macros</a></h1>
|
||||
<dl class="item">
|
||||
<dt id="markAsTransient"><a name="markAsTransient.m,typedesc,untyped"></a><pre><span class="Keyword">macro</span> <span class="Identifier">markAsTransient</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span> <span class="Identifier">field</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dt id="markAsTransient"><a name="markAsTransient.m,typedesc,untyped"></a><pre><span class="Keyword">macro</span> <span class="Identifier">markAsTransient</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span> <span class="Identifier">field</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dd>
|
||||
<p>Mark an object field as <em>transient</em>, meaning that this object field will not be serialized when an object instance is dumped as YAML, and also that the field is not expected to be given in YAML input that is loaded to an object instance.</p>
|
||||
<p>Example usage:</p>
|
||||
<pre class = "listing"><span class="Keyword">type</span> <span class="Identifier">MyObject</span> <span class="Operator">=</span> <span class="Keyword">object</span>
|
||||
<span class="Identifier">a</span><span class="Punctuation">,</span> <span class="Identifier">b</span><span class="Punctuation">:</span> <span class="Identifier">string</span>
|
||||
<span class="Identifier">c</span><span class="Punctuation">:</span> <span class="Identifier">int</span>
|
||||
<span class="Identifier">markAsTransient</span><span class="Punctuation">(</span><span class="Identifier">MyObject</span><span class="Punctuation">,</span> <span class="Identifier">a</span><span class="Punctuation">)</span>
|
||||
<span class="Identifier">markAsTransient</span><span class="Punctuation">(</span><span class="Identifier">MyObject</span><span class="Punctuation">,</span> <span class="Identifier">c</span><span class="Punctuation">)</span></pre><p>This does not work if the object has been marked as implicit.</p>
|
||||
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1393"
|
||||
href="/yaml/serialization.nim#L1498"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="setDefaultValue"><a name="setDefaultValue.m,typedesc,untyped,typed"></a><pre><span class="Keyword">macro</span> <span class="Identifier">setDefaultValue</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span> <span class="Identifier">field</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">;</span> <span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">typed</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dt id="setDefaultValue"><a name="setDefaultValue.m,typedesc,untyped,typed"></a><pre><span class="Keyword">macro</span> <span class="Identifier">setDefaultValue</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span> <span class="Identifier">field</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">;</span> <span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">typed</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<p>Set the default value of an object field. Fields with default values may be absent in YAML input when loading an instance of the object. If the field is absent in the YAML input, the default value is assigned to the field.</p>
|
||||
<p>Example usage:</p>
|
||||
<pre class = "listing"><span class="Keyword">type</span> <span class="Identifier">MyObject</span> <span class="Operator">=</span> <span class="Keyword">object</span>
|
||||
<span class="Identifier">a</span><span class="Punctuation">,</span> <span class="Identifier">b</span><span class="Punctuation">:</span> <span class="Identifier">string</span>
|
||||
<span class="Identifier">c</span><span class="Punctuation">:</span> <span class="Keyword">tuple</span><span class="Punctuation">[</span><span class="Identifier">x</span><span class="Punctuation">,</span> <span class="Identifier">y</span><span class="Punctuation">:</span> <span class="Identifier">int</span><span class="Punctuation">]</span>
|
||||
<span class="Identifier">setDefaultValue</span><span class="Punctuation">(</span><span class="Identifier">MyObject</span><span class="Punctuation">,</span> <span class="Identifier">a</span><span class="Punctuation">,</span> <span class="StringLit">"foo"</span><span class="Punctuation">)</span>
|
||||
<span class="Identifier">setDefaultValue</span><span class="Punctuation">(</span><span class="Identifier">MyObject</span><span class="Punctuation">,</span> <span class="Identifier">c</span><span class="Punctuation">,</span> <span class="Punctuation">(</span><span class="DecNumber">1</span><span class="Punctuation">,</span> <span class="DecNumber">2</span><span class="Punctuation">)</span><span class="Punctuation">)</span></pre>
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1406"
|
||||
href="/yaml/serialization.nim#L1529"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="ignoreInputKey"><a name="ignoreInputKey.m,typedesc,"></a><pre><span class="Keyword">macro</span> <span class="Identifier">ignoreInputKey</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">{</span><span class="Identifier">lit</span><span class="Other">}</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dt id="ignoreInputKey"><a name="ignoreInputKey.m,typedesc,"></a><pre><span class="Keyword">macro</span> <span class="Identifier">ignoreInputKey</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">{</span><span class="Identifier">lit</span><span class="Other">}</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<p>Tell NimYAML that when loading an object of type <tt class="docutils literal"><span class="pre">t</span></tt>, any mapping key named <tt class="docutils literal"><span class="pre">name</span></tt> shall be ignored. Note that this even ignores the key if the value of that key is necessary to construct a value of type <tt class="docutils literal"><span class="pre">t</span></tt>, making deserialization fail.</p>
|
||||
<p>Example usage:</p>
|
||||
<pre class = "listing"><span class="Keyword">type</span> <span class="Identifier">MyObject</span> <span class="Operator">=</span> <span class="Keyword">object</span>
|
||||
<span class="Identifier">a</span><span class="Punctuation">,</span> <span class="Identifier">b</span><span class="Punctuation">:</span> <span class="Identifier">string</span>
|
||||
<span class="Identifier">ignoreInputKey</span><span class="Punctuation">(</span><span class="Identifier">MyObject</span><span class="Punctuation">,</span> <span class="StringLit">"c"</span><span class="Punctuation">)</span></pre>
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1426"
|
||||
href="/yaml/serialization.nim#L1563"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="ignoreUnknownKeys"><a name="ignoreUnknownKeys.m,typedesc"></a><pre><span class="Keyword">macro</span> <span class="Identifier">ignoreUnknownKeys</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dd>
|
||||
<p>Tell NimYAML that when loading an object or tuple of type <tt class="docutils literal"><span class="pre">t</span></tt>, any mapping key that does not map to an existing field inside the object or tuple shall be ignored.</p>
|
||||
<p>Example usage:</p>
|
||||
<pre class = "listing"><span class="Keyword">type</span> <span class="Identifier">MyObject</span> <span class="Operator">=</span> <span class="Keyword">object</span>
|
||||
<span class="Identifier">a</span><span class="Punctuation">,</span> <span class="Identifier">b</span><span class="Punctuation">:</span> <span class="Identifier">string</span>
|
||||
<span class="Identifier">ignoreUnknownKeys</span><span class="Punctuation">(</span><span class="Identifier">MyObject</span><span class="Punctuation">)</span></pre>
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1586"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -799,26 +847,26 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<section id="17">
|
||||
<h1><a class="toc-backref" href="#17">Templates</a></h1>
|
||||
<dl class="item">
|
||||
<dt id="presentTag"><a name="presentTag.t,typedesc,TagStyle"></a><pre><span class="Keyword">template</span> <span class="Identifier">presentTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span></pre></dt>
|
||||
<dt id="presentTag"><a name="presentTag.t,typedesc,TagStyle"></a><pre><span class="Keyword">template</span> <span class="Identifier">presentTag</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span> <span class="Identifier">ts</span><span class="Other">:</span> <span class="Identifier">TagStyle</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span></pre></dt>
|
||||
<dd>
|
||||
Get the TagId that represents the given type in the given style
|
||||
<a
|
||||
href="/yaml/serialization.nim#L97"
|
||||
href="/yaml/serialization.nim#L105"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="constructScalarItem"><a name="constructScalarItem.t,YamlStream,untyped,typedesc,untyped"></a><pre><span class="Keyword">template</span> <span class="Identifier">constructScalarItem</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">;</span> <span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span>
|
||||
<span class="Identifier">content</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">)</span></pre></dt>
|
||||
<dt id="constructScalarItem"><a name="constructScalarItem.t,YamlStream,untyped,typedesc,untyped"></a><pre><span class="Keyword">template</span> <span class="Identifier">constructScalarItem</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">;</span> <span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span>
|
||||
<span class="Identifier">content</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">)</span></pre></dt>
|
||||
<dd>
|
||||
Helper template for implementing <tt class="docutils literal"><span class="pre">constructObject</span></tt> for types that are constructed from a scalar. <tt class="docutils literal"><span class="pre">i</span></tt> is the identifier that holds the scalar as <tt class="docutils literal"><span class="pre">YamlStreamEvent</span></tt> in the content. Exceptions raised in the content will be automatically catched and wrapped in <tt class="docutils literal"><span class="pre">YamlConstructionError</span></tt>, which will then be raised.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L126"
|
||||
href="/yaml/serialization.nim#L134"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="markAsImplicit"><a name="markAsImplicit.t,typedesc"></a><pre><span class="Keyword">template</span> <span class="Identifier">markAsImplicit</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dt id="markAsImplicit"><a name="markAsImplicit.t,typedesc"></a><pre><span class="Keyword">template</span> <span class="Identifier">markAsImplicit</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dd>
|
||||
Mark a variant object type as implicit. This requires the type to consist of nothing but a case expression and each branch of the case expression containing exactly one field - with the exception that one branch may contain zero fields.
|
||||
<a
|
||||
href="/yaml/serialization.nim#L1341"
|
||||
href="/yaml/serialization.nim#L1439"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -831,7 +879,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:31 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:37 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
104
yaml.stream.html
104
yaml.stream.html
@ -87,8 +87,23 @@
|
||||
scalarAnchor*: AnchorId
|
||||
scalarTag*: TagId
|
||||
scalarContent*: string
|
||||
when defined(yamlScalarRepInd):
|
||||
scalarRep*: ScalarRepresentationIndicator
|
||||
|
||||
of yamlEndMap, yamlEndSeq, yamlStartDoc, yamlEndDoc:
|
||||
|
||||
of yamlStartDoc:
|
||||
when defined(yamlScalarRepInd):
|
||||
explicitDirectivesEnd*: bool
|
||||
|
||||
else:
|
||||
nil
|
||||
|
||||
of yamlEndDoc:
|
||||
when defined(yamlScalarRepInd):
|
||||
explicitDocumentEnd*: bool
|
||||
|
||||
|
||||
of yamlEndMap, yamlEndSeq:
|
||||
nil
|
||||
of yamlAlias:
|
||||
aliasTarget*: AnchorId"><wbr />Yaml<wbr />Stream<wbr />Event</a></li>
|
||||
@ -192,7 +207,7 @@
|
||||
<section id="6">
|
||||
<h1><a class="toc-backref" href="#6">Imports</a></h1>
|
||||
<dl class="item">
|
||||
<a class="reference external" href="hashes.html">hashes</a>, <a class="reference external" href="../private/internal.html">../private/internal</a>, <a class="reference external" href="taglib.html">taglib</a>
|
||||
<a class="reference external" href="hashes.html">hashes</a>, <a class="reference external" href="private/internal.html">private/internal</a>, <a class="reference external" href="taglib.html">taglib</a>
|
||||
</dl></section>
|
||||
<section id="7">
|
||||
<h1><a class="toc-backref" href="#7">Types</a></h1>
|
||||
@ -202,7 +217,7 @@
|
||||
|
||||
An <tt class="docutils literal"><span class="pre">AnchorId</span></tt> identifies an anchor in the current document. It becomes invalid as soon as the current document scope is invalidated (for example, because the parser yielded a <tt class="docutils literal"><span class="pre">yamlEndDocument</span></tt> event). <tt class="docutils literal"><span class="pre">AnchorId</span></tt> s exists because of efficiency, much like <tt class="docutils literal"><span class="pre">TagId</span></tt> s. The actual anchor name is a presentation detail and cannot be queried by the user.
|
||||
<a
|
||||
href="/yaml/stream.nim#L19"
|
||||
href="/yaml/stream.nim#L23"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="YamlStreamEventKind"><a name="YamlStreamEventKind"></a><pre><span class="Identifier">YamlStreamEventKind</span> <span class="Other">=</span> <span class="Keyword">enum</span>
|
||||
@ -211,7 +226,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Kinds of YAML events that may occur in an <tt class="docutils literal"><span class="pre">YamlStream</span></tt>. Event kinds are discussed in <a class="reference external" href="#YamlStreamEvent">YamlStreamEvent</a>.
|
||||
<a
|
||||
href="/yaml/stream.nim#L27"
|
||||
href="/yaml/stream.nim#L31"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="YamlStreamEvent"><a name="YamlStreamEvent"></a><pre><span class="Identifier">YamlStreamEvent</span> <span class="Other">=</span> <span class="Keyword">object</span>
|
||||
@ -228,8 +243,23 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<span class="Identifier">scalarAnchor</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">AnchorId</span>
|
||||
<span class="Identifier">scalarTag</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">TagId</span>
|
||||
<span class="Identifier">scalarContent</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">string</span>
|
||||
<span class="Keyword">when</span> <span class="Identifier">defined</span><span class="Other">(</span><span class="Identifier">yamlScalarRepInd</span><span class="Other">)</span><span class="Other">:</span>
|
||||
<span class="Identifier">scalarRep</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">ScalarRepresentationIndicator</span>
|
||||
|
||||
<span class="Keyword">of</span> <span class="Identifier">yamlEndMap</span><span class="Other">,</span> <span class="Identifier">yamlEndSeq</span><span class="Other">,</span> <span class="Identifier">yamlStartDoc</span><span class="Other">,</span> <span class="Identifier">yamlEndDoc</span><span class="Other">:</span>
|
||||
|
||||
<span class="Keyword">of</span> <span class="Identifier">yamlStartDoc</span><span class="Other">:</span>
|
||||
<span class="Keyword">when</span> <span class="Identifier">defined</span><span class="Other">(</span><span class="Identifier">yamlScalarRepInd</span><span class="Other">)</span><span class="Other">:</span>
|
||||
<span class="Identifier">explicitDirectivesEnd</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">bool</span>
|
||||
|
||||
<span class="Keyword">else</span><span class="Other">:</span>
|
||||
<span class="Keyword">nil</span>
|
||||
|
||||
<span class="Keyword">of</span> <span class="Identifier">yamlEndDoc</span><span class="Other">:</span>
|
||||
<span class="Keyword">when</span> <span class="Identifier">defined</span><span class="Other">(</span><span class="Identifier">yamlScalarRepInd</span><span class="Other">)</span><span class="Other">:</span>
|
||||
<span class="Identifier">explicitDocumentEnd</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">bool</span>
|
||||
|
||||
|
||||
<span class="Keyword">of</span> <span class="Identifier">yamlEndMap</span><span class="Other">,</span> <span class="Identifier">yamlEndSeq</span><span class="Other">:</span>
|
||||
<span class="Keyword">nil</span>
|
||||
<span class="Keyword">of</span> <span class="Identifier">yamlAlias</span><span class="Other">:</span>
|
||||
<span class="Identifier">aliasTarget</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">AnchorId</span>
|
||||
@ -240,7 +270,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<p>A non-existing tag in the YAML character stream will be resolved to the non-specific tags <tt class="docutils literal"><span class="pre">?</span></tt> or <tt class="docutils literal"><span class="pre">!</span></tt> according to the YAML specification. These are by convention mapped to the <tt class="docutils literal"><span class="pre">TagId</span></tt> s <tt class="docutils literal"><span class="pre">yTagQuestionMark</span></tt> and <tt class="docutils literal"><span class="pre">yTagExclamationMark</span></tt> respectively. Mapping is done by a <a class="reference external" href="#TagLibrary">TagLibrary</a>.</p>
|
||||
|
||||
<a
|
||||
href="/yaml/stream.nim#L33"
|
||||
href="/yaml/stream.nim#L37"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="YamlStream"><a name="YamlStream"></a><pre><span class="Identifier">YamlStream</span> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <span class="Identifier">RootObj</span>
|
||||
@ -257,7 +287,7 @@ A <tt class="docutils literal"><span class="pre">YamlStream</span></tt> is an it
|
||||
<p>The creator of a <tt class="docutils literal"><span class="pre">YamlStream</span></tt> is responsible for it being well-formed. A user of the stream may assume that it is well-formed and is not required to check for it. The procs in this module will always yield a well-formed <tt class="docutils literal"><span class="pre">YamlStream</span></tt> and expect it to be well-formed if they take it as input parameter.</p>
|
||||
|
||||
<a
|
||||
href="/yaml/stream.nim#L59"
|
||||
href="/yaml/stream.nim#L72"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="YamlStreamError"><a name="YamlStreamError"></a><pre><span class="Identifier">YamlStreamError</span> <span class="Other">=</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <span class="Identifier">Exception</span>
|
||||
@ -265,7 +295,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Exception that may be raised by a <tt class="docutils literal"><span class="pre">YamlStream</span></tt> when the underlying backend raises an exception. The error that has occurred is available from <tt class="docutils literal"><span class="pre">parent</span></tt>.
|
||||
<a
|
||||
href="/yaml/stream.nim#L80"
|
||||
href="/yaml/stream.nim#L93"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="BufferYamlStream"><a name="BufferYamlStream"></a><pre><span class="Identifier">BufferYamlStream</span> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <span class="Identifier">YamlStream</span>
|
||||
@ -275,7 +305,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/stream.nim#L126"
|
||||
href="/yaml/stream.nim#L138"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -288,7 +318,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
|
||||
yielded when no anchor was defined for a YAML node
|
||||
<a
|
||||
href="/yaml/stream.nim#L86"
|
||||
href="/yaml/stream.nim#L99"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -300,21 +330,21 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/stream.nim#L89"
|
||||
href="/yaml/stream.nim#L102"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="$"><a name="$,AnchorId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">`$`</span><span class="Other">(</span><span class="Identifier">id</span><span class="Other">:</span> <span class="Identifier">AnchorId</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">borrow</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/stream.nim#L90"
|
||||
href="/yaml/stream.nim#L103"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="hash"><a name="hash,AnchorId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">hash</span><span class="Other">(</span><span class="Identifier">id</span><span class="Other">:</span> <span class="Identifier">AnchorId</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Hash</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">borrow</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/stream.nim#L91"
|
||||
href="/yaml/stream.nim#L104"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="basicInit"><a name="basicInit,YamlStream,proc(YamlStream,int,int,string)"></a><pre><span class="Keyword">proc</span> <span class="Identifier">basicInit</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">lastTokenContextImpl</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">YamlStream</span><span class="Other">;</span>
|
||||
@ -323,7 +353,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
initialize basic values of the YamlStream. Call this in your constructor if you subclass YamlStream.
|
||||
<a
|
||||
href="/yaml/stream.nim#L98"
|
||||
href="/yaml/stream.nim#L111"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="initYamlStream"><a name="initYamlStream,"></a><pre><span class="Keyword">proc</span> <span class="Identifier">initYamlStream</span><span class="Other">(</span><span class="Identifier">backend</span><span class="Other">:</span> <span class="Keyword">iterator</span> <span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStream</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
|
||||
@ -331,21 +361,21 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Creates a new <tt class="docutils literal"><span class="pre">YamlStream</span></tt> that uses the given iterator as backend.
|
||||
<a
|
||||
href="/yaml/stream.nim#L112"
|
||||
href="/yaml/stream.nim#L124"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="newBufferYamlStream"><a name="newBufferYamlStream,"></a><pre><span class="Keyword">proc</span> <span class="Identifier">newBufferYamlStream</span><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">BufferYamlStream</span> <span class="Keyword">not</span> <span class="Keyword">nil</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/stream.nim#L130"
|
||||
href="/yaml/stream.nim#L142"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="put"><a name="put,BufferYamlStream,YamlStreamEvent"></a><pre><span class="Keyword">proc</span> <span class="Identifier">put</span><span class="Other">(</span><span class="Identifier">bys</span><span class="Other">:</span> <span class="Identifier">BufferYamlStream</span><span class="Other">;</span> <span class="Identifier">e</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
<a
|
||||
href="/yaml/stream.nim#L145"
|
||||
href="/yaml/stream.nim#L157"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="next"><a name="next,YamlStream"></a><pre><span class="Keyword">proc</span> <span class="Identifier">next</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">YamlStream</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">YamlStreamError</span><span class="Other">]</span><span class="Other">,</span>
|
||||
@ -353,7 +383,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Get the next item of the stream. Requires <tt class="docutils literal"><span class="pre">finished(s) == true</span></tt>. If the backend yields an exception, that exception will be encapsulated into a <tt class="docutils literal"><span class="pre">YamlStreamError</span></tt>, which will be raised.
|
||||
<a
|
||||
href="/yaml/stream.nim#L148"
|
||||
href="/yaml/stream.nim#L160"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="peek"><a name="peek,YamlStream"></a><pre><span class="Keyword">proc</span> <span class="Identifier">peek</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">YamlStream</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">YamlStreamError</span><span class="Other">]</span><span class="Other">,</span>
|
||||
@ -361,21 +391,21 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Get the next item of the stream without advancing the stream. Requires <tt class="docutils literal"><span class="pre">finished(s) == true</span></tt>. Handles exceptions of the backend like <tt class="docutils literal"><span class="pre">next()</span></tt>.
|
||||
<a
|
||||
href="/yaml/stream.nim#L173"
|
||||
href="/yaml/stream.nim#L185"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="peek="><a name="peek=,YamlStream,YamlStreamEvent"></a><pre><span class="Keyword">proc</span> <span class="Identifier">peek=</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Set the next item of the stream. Will replace a previously peeked item, if one exists.
|
||||
<a
|
||||
href="/yaml/stream.nim#L182"
|
||||
href="/yaml/stream.nim#L194"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="finished"><a name="finished,YamlStream"></a><pre><span class="Keyword">proc</span> <span class="Identifier">finished</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">YamlStream</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">YamlStreamError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
<tt class="docutils literal"><span class="pre">true</span></tt> if no more items are available in the stream. Handles exceptions of the backend like <tt class="docutils literal"><span class="pre">next()</span></tt>.
|
||||
<a
|
||||
href="/yaml/stream.nim#L188"
|
||||
href="/yaml/stream.nim#L200"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="getLastTokenContext"><a name="getLastTokenContext,YamlStream,int,int,string"></a><pre><span class="Keyword">proc</span> <span class="Identifier">getLastTokenContext</span><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">YamlStream</span><span class="Other">;</span> <span class="Identifier">line</span><span class="Other">,</span> <span class="Identifier">column</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">int</span><span class="Other">;</span> <span class="Identifier">lineContent</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -383,42 +413,42 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
<tt class="docutils literal"><span class="pre">true</span></tt> if source context information is available about the last returned token. If <tt class="docutils literal"><span class="pre">true</span></tt>, line, column and lineContent are set to position and line content where the last token has been read from.
|
||||
<a
|
||||
href="/yaml/stream.nim#L210"
|
||||
href="/yaml/stream.nim#L222"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="=="><a name="==,YamlStreamEvent,YamlStreamEvent"></a><pre><span class="Keyword">proc</span> <span class="Identifier">`==`</span><span class="Other">(</span><span class="Identifier">left</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span><span class="Other">;</span> <span class="Identifier">right</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
compares all existing fields of the given items
|
||||
<a
|
||||
href="/yaml/stream.nim#L228"
|
||||
href="/yaml/stream.nim#L240"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="$"><a name="$,YamlStreamEvent"></a><pre><span class="Keyword">proc</span> <span class="Identifier">`$`</span><span class="Other">(</span><span class="Identifier">event</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
outputs a human-readable string describing the given event
|
||||
outputs a human-readable string describing the given event. This string is compatible to the format used in the yaml test suite.
|
||||
<a
|
||||
href="/yaml/stream.nim#L243"
|
||||
href="/yaml/stream.nim#L266"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="tag"><a name="tag,YamlStreamEvent"></a><pre><span class="Keyword">proc</span> <span class="Identifier">tag</span><span class="Other">(</span><span class="Identifier">event</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">FieldError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
returns the tag of the given event
|
||||
<a
|
||||
href="/yaml/stream.nim#L263"
|
||||
href="/yaml/stream.nim#L300"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="startDocEvent"><a name="startDocEvent,"></a><pre><span class="Keyword">proc</span> <span class="Identifier">startDocEvent</span><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
creates a new event that marks the start of a YAML document
|
||||
<a
|
||||
href="/yaml/stream.nim#L271"
|
||||
href="/yaml/stream.nim#L320"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="endDocEvent"><a name="endDocEvent,"></a><pre><span class="Keyword">proc</span> <span class="Identifier">endDocEvent</span><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
creates a new event that marks the end of a YAML document
|
||||
<a
|
||||
href="/yaml/stream.nim#L275"
|
||||
href="/yaml/stream.nim#L324"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="startMapEvent"><a name="startMapEvent,TagId,AnchorId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">startMapEvent</span><span class="Other">(</span><span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other">=</span> <span class="Identifier">yTagQuestionMark</span><span class="Other">;</span> <span class="Identifier">anchor</span><span class="Other">:</span> <span class="Identifier">AnchorId</span> <span class="Other">=</span> <span class="Identifier">yAnchorNone</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -426,14 +456,14 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
creates a new event that marks the start of a YAML mapping
|
||||
<a
|
||||
href="/yaml/stream.nim#L279"
|
||||
href="/yaml/stream.nim#L328"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="endMapEvent"><a name="endMapEvent,"></a><pre><span class="Keyword">proc</span> <span class="Identifier">endMapEvent</span><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
creates a new event that marks the end of a YAML mapping
|
||||
<a
|
||||
href="/yaml/stream.nim#L284"
|
||||
href="/yaml/stream.nim#L333"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="startSeqEvent"><a name="startSeqEvent,TagId,AnchorId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">startSeqEvent</span><span class="Other">(</span><span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other">=</span> <span class="Identifier">yTagQuestionMark</span><span class="Other">;</span> <span class="Identifier">anchor</span><span class="Other">:</span> <span class="Identifier">AnchorId</span> <span class="Other">=</span> <span class="Identifier">yAnchorNone</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -441,14 +471,14 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
creates a new event that marks the beginning of a YAML sequence
|
||||
<a
|
||||
href="/yaml/stream.nim#L288"
|
||||
href="/yaml/stream.nim#L337"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="endSeqEvent"><a name="endSeqEvent,"></a><pre><span class="Keyword">proc</span> <span class="Identifier">endSeqEvent</span><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
creates a new event that marks the end of a YAML sequence
|
||||
<a
|
||||
href="/yaml/stream.nim#L293"
|
||||
href="/yaml/stream.nim#L342"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="scalarEvent"><a name="scalarEvent,string,TagId,AnchorId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">scalarEvent</span><span class="Other">(</span><span class="Identifier">content</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other">=</span> <span class="StringLit">""</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other">=</span> <span class="Identifier">yTagQuestionMark</span><span class="Other">;</span>
|
||||
@ -457,14 +487,14 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
creates a new event that represents a YAML scalar
|
||||
<a
|
||||
href="/yaml/stream.nim#L297"
|
||||
href="/yaml/stream.nim#L356"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="aliasEvent"><a name="aliasEvent,AnchorId"></a><pre><span class="Keyword">proc</span> <span class="Identifier">aliasEvent</span><span class="Other">(</span><span class="Identifier">anchor</span><span class="Other">:</span> <span class="Identifier">AnchorId</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">YamlStreamEvent</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
creates a new event that represents a YAML alias
|
||||
<a
|
||||
href="/yaml/stream.nim#L303"
|
||||
href="/yaml/stream.nim#L362"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -477,14 +507,14 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Iterate over all items of the stream. You may not use <tt class="docutils literal"><span class="pre">peek()</span></tt> on the stream while iterating.
|
||||
<a
|
||||
href="/yaml/stream.nim#L217"
|
||||
href="/yaml/stream.nim#L229"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="mitems"><a name="mitems.i,BufferYamlStream"></a><pre><span class="Keyword">iterator</span> <span class="Identifier">mitems</span><span class="Other">(</span><span class="Identifier">bys</span><span class="Other">:</span> <span class="Identifier">BufferYamlStream</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">YamlStreamEvent</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
Iterate over all items of the stream. You may not use <tt class="docutils literal"><span class="pre">peek()</span></tt> on the stream while iterating.
|
||||
<a
|
||||
href="/yaml/stream.nim#L223"
|
||||
href="/yaml/stream.nim#L235"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -497,7 +527,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:31 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:37 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -184,27 +184,27 @@
|
||||
<li><a class="reference" href="#initSerializationTagLibrary,"
|
||||
title="initSerializationTagLibrary(): TagLibrary"><wbr />init<wbr />Serialization<wbr />Tag<wbr />Library</a></li>
|
||||
<li><a class="reference" href="#yamlTag,"
|
||||
title="yamlTag[](T126499: typedesc[char]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T148327: typedesc[char]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#yamlTag,_2"
|
||||
title="yamlTag[](T126824: typedesc[int8]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T148769: typedesc[int8]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#yamlTag,_3"
|
||||
title="yamlTag[](T127224: typedesc[int16]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T149169: typedesc[int16]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#yamlTag,_4"
|
||||
title="yamlTag[](T127624: typedesc[int32]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T149569: typedesc[int32]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#yamlTag,_5"
|
||||
title="yamlTag[](T128024: typedesc[int64]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T149969: typedesc[int64]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#yamlTag,_6"
|
||||
title="yamlTag[](T128424: typedesc[uint8]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T150369: typedesc[uint8]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#yamlTag,_7"
|
||||
title="yamlTag[](T128824: typedesc[uint16]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T150769: typedesc[uint16]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#yamlTag,_8"
|
||||
title="yamlTag[](T129224: typedesc[uint32]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T151169: typedesc[uint32]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#yamlTag,_9"
|
||||
title="yamlTag[](T129624: typedesc[uint64]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T151569: typedesc[uint64]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#yamlTag,_10"
|
||||
title="yamlTag[](T130024: typedesc[float32]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T151969: typedesc[float32]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#yamlTag,_11"
|
||||
title="yamlTag[](T130424: typedesc[float64]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
title="yamlTag(T152369: typedesc[float64]): TagId"><wbr />yaml<wbr />Tag</a></li>
|
||||
<li><a class="reference" href="#registerHandle,TagLibrary,string,string"
|
||||
title="registerHandle(tagLib: TagLibrary; handle, prefix: string)"><wbr />register<wbr />Handle</a></li>
|
||||
<li><a class="reference" href="#searchHandle,TagLibrary,string"
|
||||
@ -226,9 +226,9 @@
|
||||
<a class="reference reference-toplevel" href="#17" id="67">Templates</a>
|
||||
<ul class="simple simple-toc-section">
|
||||
<li><a class="reference" href="#setTagUri.t,typedesc,string"
|
||||
title="setTagUri[](t: typedesc; uri: string): typed"><wbr />set<wbr />Tag<wbr />Uri</a></li>
|
||||
title="setTagUri(t: typedesc; uri: string): typed"><wbr />set<wbr />Tag<wbr />Uri</a></li>
|
||||
<li><a class="reference" href="#setTagUri.t,typedesc,string,untyped"
|
||||
title="setTagUri[](t: typedesc; uri: string; idName: untyped): typed"><wbr />set<wbr />Tag<wbr />Uri</a></li>
|
||||
title="setTagUri(t: typedesc; uri: string; idName: untyped): typed"><wbr />set<wbr />Tag<wbr />Uri</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@ -651,81 +651,81 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
href="/yaml/taglib.nim#L201"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">126499</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">char</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">148327</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">char</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
autogenerated
|
||||
<a
|
||||
href="/yaml/taglib.nim#L262"
|
||||
href="/yaml/taglib.nim#L282"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,_2"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">126824</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">int8</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,_2"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">148769</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">int8</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
autogenerated
|
||||
<a
|
||||
href="/yaml/taglib.nim#L262"
|
||||
href="/yaml/taglib.nim#L283"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,_3"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">127224</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">int16</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,_3"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">149169</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">int16</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
autogenerated
|
||||
<a
|
||||
href="/yaml/taglib.nim#L262"
|
||||
href="/yaml/taglib.nim#L284"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,_4"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">127624</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">int32</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,_4"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">149569</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">int32</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
autogenerated
|
||||
<a
|
||||
href="/yaml/taglib.nim#L262"
|
||||
href="/yaml/taglib.nim#L285"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,_5"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">128024</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">int64</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,_5"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">149969</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">int64</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
autogenerated
|
||||
<a
|
||||
href="/yaml/taglib.nim#L262"
|
||||
href="/yaml/taglib.nim#L286"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,_6"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">128424</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">uint8</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,_6"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">150369</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">uint8</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
autogenerated
|
||||
<a
|
||||
href="/yaml/taglib.nim#L262"
|
||||
href="/yaml/taglib.nim#L287"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,_7"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">128824</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">uint16</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,_7"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">150769</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">uint16</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
autogenerated
|
||||
<a
|
||||
href="/yaml/taglib.nim#L262"
|
||||
href="/yaml/taglib.nim#L288"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,_8"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">129224</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">uint32</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,_8"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">151169</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">uint32</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
autogenerated
|
||||
<a
|
||||
href="/yaml/taglib.nim#L262"
|
||||
href="/yaml/taglib.nim#L289"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,_9"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">129624</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">uint64</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,_9"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">151569</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">uint64</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
autogenerated
|
||||
<a
|
||||
href="/yaml/taglib.nim#L262"
|
||||
href="/yaml/taglib.nim#L290"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,_10"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">130024</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">float32</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,_10"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">151969</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">float32</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
autogenerated
|
||||
<a
|
||||
href="/yaml/taglib.nim#L262"
|
||||
href="/yaml/taglib.nim#L291"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="yamlTag"><a name="yamlTag,_11"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">130424</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">float64</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dt id="yamlTag"><a name="yamlTag,_11"></a><pre><span class="Keyword">proc</span> <span class="Identifier">yamlTag</span><span class="Other">(</span><span class="Identifier">T</span><span class="DecNumber">152369</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><span class="Identifier">float64</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">TagId</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
<dd>
|
||||
autogenerated
|
||||
<a
|
||||
href="/yaml/taglib.nim#L262"
|
||||
href="/yaml/taglib.nim#L292"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="registerHandle"><a name="registerHandle,TagLibrary,string,string"></a><pre><span class="Keyword">proc</span> <span class="Identifier">registerHandle</span><span class="Other">(</span><span class="Identifier">tagLib</span><span class="Other">:</span> <span class="Identifier">TagLibrary</span><span class="Other">;</span> <span class="Identifier">handle</span><span class="Other">,</span> <span class="Identifier">prefix</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span> <span class="Other pragmabegin">{.</span><div class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></div><span class="Other pragmaend">.}</span></pre></dt>
|
||||
@ -768,14 +768,14 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<section id="17">
|
||||
<h1><a class="toc-backref" href="#17">Templates</a></h1>
|
||||
<dl class="item">
|
||||
<dt id="setTagUri"><a name="setTagUri.t,typedesc,string"></a><pre><span class="Keyword">template</span> <span class="Identifier">setTagUri</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span> <span class="Identifier">uri</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dt id="setTagUri"><a name="setTagUri.t,typedesc,string"></a><pre><span class="Keyword">template</span> <span class="Identifier">setTagUri</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span> <span class="Identifier">uri</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dd>
|
||||
Associate the given uri with a certain type. This uri is used as YAML tag when loading and dumping values of this type.
|
||||
<a
|
||||
href="/yaml/taglib.nim#L234"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="setTagUri"><a name="setTagUri.t,typedesc,string,untyped"></a><pre><span class="Keyword">template</span> <span class="Identifier">setTagUri</span><span class="Other">[</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span> <span class="Identifier">uri</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">;</span> <span class="Identifier">idName</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dt id="setTagUri"><a name="setTagUri.t,typedesc,string,untyped"></a><pre><span class="Keyword">template</span> <span class="Identifier">setTagUri</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">;</span> <span class="Identifier">uri</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">;</span> <span class="Identifier">idName</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">typed</span></pre></dt>
|
||||
<dd>
|
||||
Like <a class="reference external" href="#setTagUri.t,typedesc,string">setTagUri</a>, but lets you choose a symbol for the <a class="reference external" href="#TagId">TagId</a> of the uri. This is only necessary if you want to implement serialization / construction yourself.
|
||||
<a
|
||||
@ -792,7 +792,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:31 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:37 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -86,7 +86,7 @@
|
||||
<section id="6">
|
||||
<h1><a class="toc-backref" href="#6">Imports</a></h1>
|
||||
<dl class="item">
|
||||
<a class="reference external" href="json.html">json</a>, <a class="reference external" href="streams.html">streams</a>, <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="tables.html">tables</a>, <a class="reference external" href="taglib.html">taglib</a>, <a class="reference external" href="hints.html">hints</a>, <a class="reference external" href="serialization.html">serialization</a>, <a class="reference external" href="stream.html">stream</a>, <a class="reference external" href="../private/internal.html">../private/internal</a>, <a class="reference external" href="parser.html">parser</a>
|
||||
<a class="reference external" href="json.html">json</a>, <a class="reference external" href="streams.html">streams</a>, <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="tables.html">tables</a>, <a class="reference external" href="taglib.html">taglib</a>, <a class="reference external" href="hints.html">hints</a>, <a class="reference external" href="serialization.html">serialization</a>, <a class="reference external" href="stream.html">stream</a>, <a class="reference external" href="private/internal.html">private/internal</a>, <a class="reference external" href="parser.html">parser</a>
|
||||
</dl></section>
|
||||
<section id="12">
|
||||
<h1><a class="toc-backref" href="#12">Procs</a></h1>
|
||||
@ -107,7 +107,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Uses <a class="reference external" href="#YamlParser">YamlParser</a> and <a class="reference external" href="#constructJson">constructJson</a> to construct an in-memory JSON tree from a YAML character stream.
|
||||
<a
|
||||
href="/yaml/tojson.nim#L179"
|
||||
href="/yaml/tojson.nim#L180"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
<dt id="loadToJson"><a name="loadToJson,string"></a><pre><span class="Keyword">proc</span> <span class="Identifier">loadToJson</span><span class="Other">(</span><span class="Identifier">str</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">JsonNode</span><span class="Other">]</span> <span class="Other pragmabegin">{.</span><div class="pragma">
|
||||
@ -116,7 +116,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<dd>
|
||||
Uses <a class="reference external" href="#YamlParser">YamlParser</a> and <a class="reference external" href="#constructJson">constructJson</a> to construct an in-memory JSON tree from a YAML character stream.
|
||||
<a
|
||||
href="/yaml/tojson.nim#L197"
|
||||
href="/yaml/tojson.nim#L198"
|
||||
class="link-seesrc" target="_blank">Source</a>
|
||||
</dd>
|
||||
|
||||
@ -129,7 +129,7 @@ class="link-seesrc" target="_blank">Source</a>
|
||||
<div class="twelve-columns footer">
|
||||
<span class="nim-sprite"></span>
|
||||
<br/>
|
||||
<small>Made with Nim. Generated: 2016-11-08 21:32:32 UTC</small>
|
||||
<small>Made with Nim. Generated: 2017-09-20 19:08:38 UTC</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user