mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Deploying to gh-pages from @ bedf3a68d7
🚀
This commit is contained in:
parent
783b1f1658
commit
edc349b964
93 changed files with 3493 additions and 1634 deletions
|
@ -3,28 +3,28 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.35.1">
|
||||
<meta name="crystal_docs.project_version" content="0.13.3-dev">
|
||||
<meta name="generator" content="Crystal Docs 0.34.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
||||
|
||||
<link href="../../css/style.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../js/doc.js"></script>
|
||||
|
||||
<meta name="repository-name" content="ameba">
|
||||
<title>Ameba::AST::Assignment - ameba 0.13.3-dev</title>
|
||||
<script type="text/javascript">
|
||||
CrystalDocs.base_path = "../../";
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<svg class="hidden">
|
||||
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<meta id="repository-name" content="ameba">
|
||||
<title>Ameba::AST::Assignment - ameba master</title>
|
||||
<script type="text/javascript">
|
||||
CrystalDocs.base_path = "../../";
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<div class="search-box">
|
||||
|
@ -39,12 +39,12 @@
|
|||
</h1>
|
||||
|
||||
<span class="project-version">
|
||||
0.13.3-dev
|
||||
master
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-results hidden">
|
||||
<div class="search-results" class="hidden">
|
||||
<ul class="search-list"></ul>
|
||||
</div>
|
||||
|
||||
|
@ -599,6 +599,13 @@ Holds the assign node and the variable.</p>
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L7" target="_blank">
|
||||
ameba/ast/variabling/assignment.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -790,12 +797,14 @@ Holds the assign node and the variable.</p>
|
|||
|
||||
<p>Creates a new assignment.</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="t">Assignment</span>.<span class="k">new</span>(node, variable, scope)</code></pre>
|
||||
<pre><code><span class="t">Assignment</span>.<span class="k">new</span>(node, variable, scope)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L32" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -829,6 +838,8 @@ Holds the assign node and the variable.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -843,6 +854,8 @@ Holds the assign node and the variable.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -857,6 +870,8 @@ Holds the assign node and the variable.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -873,12 +888,14 @@ Holds the assign node and the variable.</p>
|
|||
<p>Returns true if this assignment is in a branch, false if not.
|
||||
For example, this assignment is in a branch:</p>
|
||||
|
||||
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span> <span class="k">if</span> a.<span class="k">nil?</span></code></pre>
|
||||
<pre><code>a <span class="o">=</span> <span class="n">1</span> <span class="k">if</span> a.<span class="k">nil?</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L61" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -893,6 +910,8 @@ For example, this assignment is in a branch:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -907,6 +926,8 @@ For example, this assignment is in a branch:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -926,6 +947,8 @@ For example, this assignment is in a branch:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L11" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -942,12 +965,14 @@ For example, this assignment is in a branch:</p>
|
|||
<p>Returns true if this assignment is an op assign, false if not.
|
||||
For example, this is an op assign:</p>
|
||||
|
||||
<pre><code class="language-crystal">a ||= <span class="n">1</span></code></pre>
|
||||
<pre><code>a ||= <span class="n">1</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L51" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -962,6 +987,8 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -976,6 +1003,8 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -990,6 +1019,8 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L41" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1009,6 +1040,8 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1028,6 +1061,8 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L66" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1042,6 +1077,8 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1056,6 +1093,8 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1072,13 +1111,13 @@ For example, this is an op assign:</p>
|
|||
<p>Indicates whether the node is a transformed assignment by the compiler.
|
||||
i.e.</p>
|
||||
|
||||
<pre><code class="language-crystal">collection.each <span class="k">do</span> <span class="o">|</span>(a, b)<span class="o">|</span>
|
||||
<pre><code>collection.each <span class="k">do</span> <span class="o">|</span>(a, b)<span class="o">|</span>
|
||||
puts b
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>is transformed to:</p>
|
||||
|
||||
<pre><code class="language-crystal">collection.each <span class="k">do</span> <span class="o">|</span>__arg0<span class="o">|</span>
|
||||
<pre><code>collection.each <span class="k">do</span> <span class="o">|</span>__arg0<span class="o">|</span>
|
||||
a <span class="o">=</span> __arg0[<span class="n">0</span>]
|
||||
b <span class="o">=</span> __arg0[<span class="n">1</span>]
|
||||
puts(b)
|
||||
|
@ -1088,6 +1127,8 @@ i.e.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L99" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1107,6 +1148,8 @@ i.e.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/assignment.cr#L14" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue