Skip to content

Commit

Permalink
clarified that path pairs are paths, sequences are _not_. a GramSeq i…
Browse files Browse the repository at this point in the history
…s a 'compilation unit' of sequential path definitions
  • Loading branch information
akollegger committed Nov 22, 2020
1 parent 86af28d commit 4c841eb
Show file tree
Hide file tree
Showing 79 changed files with 3,157 additions and 3,031 deletions.
2 changes: 1 addition & 1 deletion docs/_site/api/assets/js/search.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions docs/_site/api/modules/gram_ast.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h3>Use <a href="gram_parse.html">gram-parse</a> to create an AST, then introspe
const parsed = <span class="hljs-keyword">to</span><span class="hljs-constructor">AST(<span class="hljs-params">src</span>)</span>;

<span class="hljs-comment">// the top-level of the AST is a sequence of paths</span>
console.<span class="hljs-keyword">assert</span>(is<span class="hljs-constructor">GramPathSequence(<span class="hljs-params">parsed</span>)</span>);
console.<span class="hljs-keyword">assert</span>(is<span class="hljs-constructor">GramSeq(<span class="hljs-params">parsed</span>)</span>);

<span class="hljs-comment">// the first path should be an edge</span>
const firstPath = parsed.children<span class="hljs-literal">[<span class="hljs-number">0</span>]</span>;
Expand Down Expand Up @@ -173,7 +173,7 @@ <h3>References</h3>
<li class="tsd-kind-reference tsd-parent-kind-module"><a href="gram_ast.html#isgramliteralarray" class="tsd-kind-icon">isGramLiteralArray</a></li>
<li class="tsd-kind-reference tsd-parent-kind-module"><a href="gram_ast.html#isgramnode" class="tsd-kind-icon">isGramNode</a></li>
<li class="tsd-kind-reference tsd-parent-kind-module"><a href="gram_ast.html#isgrampath" class="tsd-kind-icon">isGramPath</a></li>
<li class="tsd-kind-reference tsd-parent-kind-module"><a href="gram_ast.html#isgrampathsequence" class="tsd-kind-icon">isGramPathSequence</a></li>
<li class="tsd-kind-reference tsd-parent-kind-module"><a href="gram_ast.html#isGramSeq" class="tsd-kind-icon">isGramSeq</a></li>
<li class="tsd-kind-reference tsd-parent-kind-module"><a href="gram_ast.html#isgrampathlike" class="tsd-kind-icon">isGramPathlike</a></li>
<li class="tsd-kind-reference tsd-parent-kind-module"><a href="gram_ast.html#isgramproperty" class="tsd-kind-icon">isGramProperty</a></li>
<li class="tsd-kind-reference tsd-parent-kind-module"><a href="gram_ast.html#isgramrecord" class="tsd-kind-icon">isGramRecord</a></li>
Expand Down Expand Up @@ -260,7 +260,7 @@ <h3>Functions</h3>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="gram_ast.html#isgramliteralarray-1" class="tsd-kind-icon">isGramLiteralArray</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="gram_ast.html#isgramnode-1" class="tsd-kind-icon">isGramNode</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="gram_ast.html#isgrampath-1" class="tsd-kind-icon">isGramPath</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="gram_ast.html#isgrampathsequence-1" class="tsd-kind-icon">isGramPathSequence</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="gram_ast.html#isGramSeq-1" class="tsd-kind-icon">isGramSeq</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="gram_ast.html#isgrampathlike-1" class="tsd-kind-icon">isGramPathlike</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="gram_ast.html#isgramproperty-1" class="tsd-kind-icon">isGramProperty</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="gram_ast.html#isgramrecord-1" class="tsd-kind-icon">isGramRecord</a></li>
Expand Down Expand Up @@ -557,7 +557,7 @@ <h3>is<wbr>Gram<wbr>Path</h3>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-reference tsd-parent-kind-module">
<a name="isgrampathsequence" class="tsd-anchor"></a>
<a name="isGramSeq" class="tsd-anchor"></a>
<h3>is<wbr>Gram<wbr>Path<wbr>Sequence</h3>
<div class="tsd-signature tsd-kind-icon">is<wbr>Gram<wbr>Path<wbr>Sequence<span class="tsd-signature-symbol">:</span></div>
<aside class="tsd-sources">
Expand Down Expand Up @@ -1248,7 +1248,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">o</span><
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
<a name="isgrampathsequence-1" class="tsd-anchor"></a>
<a name="isGramSeq-1" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagConst">Const</span> is<wbr>Gram<wbr>Path<wbr>Sequence</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
<li class="tsd-signature tsd-kind-icon">is<wbr>Gram<wbr>Path<wbr>Sequence<span class="tsd-signature-symbol">(</span>o<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">o</span></li>
Expand All @@ -1262,7 +1262,7 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> is<wbr>Gram<wbr>Path<wbr>Se
</aside>
<div class="tsd-comment tsd-typography tsd-comment-shorttext">
<div class="lead">
<p>Type guard for GramPathSequence.</p>
<p>Type guard for GramSeq.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1572,7 +1572,7 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> is<wbr>Tagged<wbr>Literal</
</aside>
<div class="tsd-comment tsd-typography tsd-comment-shorttext">
<div class="lead">
<p>Type guard for GramPathSequence.</p>
<p>Type guard for GramSeq.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1890,7 +1890,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">o</span><
<a href="gram_ast.html#isgrampath" class="tsd-kind-icon">is<wbr>Gram<wbr>Path</a>
</li>
<li class=" tsd-kind-reference tsd-parent-kind-module">
<a href="gram_ast.html#isgrampathsequence" class="tsd-kind-icon">is<wbr>Gram<wbr>Path<wbr>Sequence</a>
<a href="gram_ast.html#isGramSeq" class="tsd-kind-icon">is<wbr>Gram<wbr>Path<wbr>Sequence</a>
</li>
<li class=" tsd-kind-reference tsd-parent-kind-module">
<a href="gram_ast.html#isgrampathlike" class="tsd-kind-icon">is<wbr>Gram<wbr>Pathlike</a>
Expand Down Expand Up @@ -2091,7 +2091,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">o</span><
<a href="gram_ast.html#isgrampath-1" class="tsd-kind-icon">is<wbr>Gram<wbr>Path</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module">
<a href="gram_ast.html#isgrampathsequence-1" class="tsd-kind-icon">is<wbr>Gram<wbr>Path<wbr>Sequence</a>
<a href="gram_ast.html#isGramSeq-1" class="tsd-kind-icon">is<wbr>Gram<wbr>Path<wbr>Sequence</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module">
<a href="gram_ast.html#isgrampathlike-1" class="tsd-kind-icon">is<wbr>Gram<wbr>Pathlike</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/assets/js/search.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/api/classes/gram_value.invalidasterror.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in packages/gram-value/src/gram-value.ts:34</li>
<li>Defined in packages/gram-value/src/gram-value.ts:39</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -165,7 +165,7 @@ <h3>ast</h3>
<div class="tsd-signature tsd-kind-icon">ast<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">UnistParent</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">UnistLiteral</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">UnistNode</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in packages/gram-value/src/gram-value.ts:34</li>
<li>Defined in packages/gram-value/src/gram-value.ts:39</li>
</ul>
</aside>
</section>
Expand Down
14 changes: 7 additions & 7 deletions docs/api/interfaces/gram_ast.booleanliteral-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h1>Interface BooleanLiteral</h1>
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<a href="gram_ast.gramliteral-1.html" class="tsd-signature-type">GramLiteral</a>
<a href="gram_ast.textliteral.html" class="tsd-signature-type">TextLiteral</a>
<ul class="tsd-hierarchy">
<li>
<span class="target">BooleanLiteral</span>
Expand Down Expand Up @@ -145,7 +145,7 @@ <h2>Properties</h2>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> data</h3>
<div class="tsd-signature tsd-kind-icon">data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Data</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="gram_ast.grampathlike-1.html">GramPathlike</a>.<a href="gram_ast.grampathlike-1.html#data">data</a></p>
<p>Inherited from <a href="gram_ast.gramseq-1.html">GramSeq</a>.<a href="gram_ast.gramseq-1.html#data">data</a></p>
<ul>
<li>Defined in packages/gram-ast/node_modules/@types/unist/index.d.ts:23</li>
</ul>
Expand All @@ -161,7 +161,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> data</h3>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> position</h3>
<div class="tsd-signature tsd-kind-icon">position<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Position</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="gram_ast.grampathlike-1.html">GramPathlike</a>.<a href="gram_ast.grampathlike-1.html#position">position</a></p>
<p>Inherited from <a href="gram_ast.gramseq-1.html">GramSeq</a>.<a href="gram_ast.gramseq-1.html#position">position</a></p>
<ul>
<li>Defined in packages/gram-ast/node_modules/@types/unist/index.d.ts:29</li>
</ul>
Expand All @@ -178,9 +178,9 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> position</h3>
<h3>type</h3>
<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"boolean"</span></div>
<aside class="tsd-sources">
<p>Overrides <a href="gram_ast.gramliteral-1.html">GramLiteral</a>.<a href="gram_ast.gramliteral-1.html#type">type</a></p>
<p>Overrides <a href="gram_ast.textliteral.html">TextLiteral</a>.<a href="gram_ast.textliteral.html#type">type</a></p>
<ul>
<li>Defined in packages/gram-ast/src/gram-types.ts:334</li>
<li>Defined in packages/gram-ast/src/gram-types.ts:339</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography tsd-comment-shorttext">
Expand All @@ -194,9 +194,9 @@ <h3>type</h3>
<h3>value</h3>
<div class="tsd-signature tsd-kind-icon">value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"true"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"false"</span></div>
<aside class="tsd-sources">
<p>Overrides <a href="gram_ast.gramliteral-1.html">GramLiteral</a>.<a href="gram_ast.gramliteral-1.html#value">value</a></p>
<p>Overrides <a href="gram_ast.textliteral.html">TextLiteral</a>.<a href="gram_ast.textliteral.html#value">value</a></p>
<ul>
<li>Defined in packages/gram-ast/src/gram-types.ts:336</li>
<li>Defined in packages/gram-ast/src/gram-types.ts:341</li>
</ul>
</aside>
</section>
Expand Down
14 changes: 7 additions & 7 deletions docs/api/interfaces/gram_ast.dateliteral-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ <h2>Properties</h2>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> data</h3>
<div class="tsd-signature tsd-kind-icon">data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Data</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="gram_ast.grampathlike-1.html">GramPathlike</a>.<a href="gram_ast.grampathlike-1.html#data">data</a></p>
<p>Inherited from <a href="gram_ast.gramseq-1.html">GramSeq</a>.<a href="gram_ast.gramseq-1.html#data">data</a></p>
<ul>
<li>Defined in packages/gram-ast/node_modules/@types/unist/index.d.ts:23</li>
</ul>
Expand All @@ -170,7 +170,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> data</h3>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> position</h3>
<div class="tsd-signature tsd-kind-icon">position<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Position</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="gram_ast.grampathlike-1.html">GramPathlike</a>.<a href="gram_ast.grampathlike-1.html#position">position</a></p>
<p>Inherited from <a href="gram_ast.gramseq-1.html">GramSeq</a>.<a href="gram_ast.gramseq-1.html#position">position</a></p>
<ul>
<li>Defined in packages/gram-ast/node_modules/@types/unist/index.d.ts:29</li>
</ul>
Expand All @@ -189,7 +189,7 @@ <h3>tag</h3>
<aside class="tsd-sources">
<p>Overrides <a href="gram_ast.taggedliteral-1.html">TaggedLiteral</a>.<a href="gram_ast.taggedliteral-1.html#tag">tag</a></p>
<ul>
<li>Defined in packages/gram-ast/src/gram-types.ts:487</li>
<li>Defined in packages/gram-ast/src/gram-types.ts:492</li>
</ul>
</aside>
</section>
Expand All @@ -199,9 +199,9 @@ <h3>type</h3>
<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"tagged"</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="gram_ast.taggedliteral-1.html">TaggedLiteral</a>.<a href="gram_ast.taggedliteral-1.html#type">type</a></p>
<p>Overrides <a href="gram_ast.gramliteral-1.html">GramLiteral</a>.<a href="gram_ast.gramliteral-1.html#type">type</a></p>
<p>Overrides <a href="gram_ast.textliteral.html">TextLiteral</a>.<a href="gram_ast.textliteral.html#type">type</a></p>
<ul>
<li>Defined in packages/gram-ast/src/gram-types.ts:381</li>
<li>Defined in packages/gram-ast/src/gram-types.ts:386</li>
</ul>
</aside>
</section>
Expand All @@ -210,10 +210,10 @@ <h3>type</h3>
<h3>value</h3>
<div class="tsd-signature tsd-kind-icon">value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="gram_ast.gramliteral-1.html">GramLiteral</a>.<a href="gram_ast.gramliteral-1.html#value">value</a></p>
<p>Inherited from <a href="gram_ast.textliteral.html">TextLiteral</a>.<a href="gram_ast.textliteral.html#value">value</a></p>
<p>Overrides Literal.value</p>
<ul>
<li>Defined in packages/gram-ast/src/gram-types.ts:317</li>
<li>Defined in packages/gram-ast/src/gram-types.ts:311</li>
</ul>
</aside>
</section>
Expand Down
14 changes: 7 additions & 7 deletions docs/api/interfaces/gram_ast.datetimeliteral-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ <h2>Properties</h2>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> data</h3>
<div class="tsd-signature tsd-kind-icon">data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Data</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="gram_ast.grampathlike-1.html">GramPathlike</a>.<a href="gram_ast.grampathlike-1.html#data">data</a></p>
<p>Inherited from <a href="gram_ast.gramseq-1.html">GramSeq</a>.<a href="gram_ast.gramseq-1.html#data">data</a></p>
<ul>
<li>Defined in packages/gram-ast/node_modules/@types/unist/index.d.ts:23</li>
</ul>
Expand All @@ -172,7 +172,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> data</h3>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> position</h3>
<div class="tsd-signature tsd-kind-icon">position<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Position</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="gram_ast.grampathlike-1.html">GramPathlike</a>.<a href="gram_ast.grampathlike-1.html#position">position</a></p>
<p>Inherited from <a href="gram_ast.gramseq-1.html">GramSeq</a>.<a href="gram_ast.gramseq-1.html#position">position</a></p>
<ul>
<li>Defined in packages/gram-ast/node_modules/@types/unist/index.d.ts:29</li>
</ul>
Expand All @@ -191,7 +191,7 @@ <h3>tag</h3>
<aside class="tsd-sources">
<p>Overrides <a href="gram_ast.taggedliteral-1.html">TaggedLiteral</a>.<a href="gram_ast.taggedliteral-1.html#tag">tag</a></p>
<ul>
<li>Defined in packages/gram-ast/src/gram-types.ts:525</li>
<li>Defined in packages/gram-ast/src/gram-types.ts:530</li>
</ul>
</aside>
</section>
Expand All @@ -201,9 +201,9 @@ <h3>type</h3>
<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"tagged"</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="gram_ast.taggedliteral-1.html">TaggedLiteral</a>.<a href="gram_ast.taggedliteral-1.html#type">type</a></p>
<p>Overrides <a href="gram_ast.gramliteral-1.html">GramLiteral</a>.<a href="gram_ast.gramliteral-1.html#type">type</a></p>
<p>Overrides <a href="gram_ast.textliteral.html">TextLiteral</a>.<a href="gram_ast.textliteral.html#type">type</a></p>
<ul>
<li>Defined in packages/gram-ast/src/gram-types.ts:381</li>
<li>Defined in packages/gram-ast/src/gram-types.ts:386</li>
</ul>
</aside>
</section>
Expand All @@ -212,10 +212,10 @@ <h3>type</h3>
<h3>value</h3>
<div class="tsd-signature tsd-kind-icon">value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="gram_ast.gramliteral-1.html">GramLiteral</a>.<a href="gram_ast.gramliteral-1.html#value">value</a></p>
<p>Inherited from <a href="gram_ast.textliteral.html">TextLiteral</a>.<a href="gram_ast.textliteral.html#value">value</a></p>
<p>Overrides Literal.value</p>
<ul>
<li>Defined in packages/gram-ast/src/gram-types.ts:317</li>
<li>Defined in packages/gram-ast/src/gram-types.ts:311</li>
</ul>
</aside>
</section>
Expand Down
Loading

0 comments on commit 4c841eb

Please sign in to comment.