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::Argument - 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::Argument - 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>
|
||||
|
||||
|
@ -579,7 +579,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
|
||||
<p>For example, all these vars are arguments:</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>(a, b, c <span class="o">=</span> <span class="n">10</span>, <span class="o">&</span>block)
|
||||
<pre><code><span class="k">def</span> <span class="m">method</span>(a, b, c <span class="o">=</span> <span class="n">10</span>, <span class="o">&</span>block)
|
||||
<span class="n">3</span>.times <span class="k">do</span> <span class="o">|</span>i<span class="o">|</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
|
@ -608,6 +608,13 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/argument.cr#L15" target="_blank">
|
||||
ameba/ast/variabling/argument.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -756,12 +763,14 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
|
||||
<p>Creates a new argument.</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="t">Argument</span>.<span class="k">new</span>(node, variable)</code></pre>
|
||||
<pre><code><span class="t">Argument</span>.<span class="k">new</span>(node, variable)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/argument.cr#L31" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -790,6 +799,8 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/argument.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -804,6 +815,8 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/argument.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -823,6 +836,8 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/argument.cr#L35" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -837,6 +852,8 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/argument.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -851,6 +868,8 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/argument.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -870,6 +889,8 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/argument.cr#L40" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -889,6 +910,8 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/argument.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -903,6 +926,8 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/argument.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -917,6 +942,8 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/argument.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -936,6 +963,8 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/argument.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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::BaseVisitor - 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::BaseVisitor - 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>
|
||||
|
||||
|
@ -616,6 +616,13 @@
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/base_visitor.cr#L6" target="_blank">
|
||||
ameba/ast/visitors/base_visitor.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -723,12 +730,14 @@
|
|||
|
||||
<p>Creates instance of this visitor.</p>
|
||||
|
||||
<pre><code class="language-crystal">visitor <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">AST</span><span class="t">::</span><span class="t">NodeVisitor</span>.<span class="k">new</span>(rule, source)</code></pre>
|
||||
<pre><code>visitor <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">AST</span><span class="t">::</span><span class="t">NodeVisitor</span>.<span class="k">new</span>(rule, source)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/base_visitor.cr#L19" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -763,6 +772,8 @@ Returns true meaning all child nodes will be traversed.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/base_visitor.cr#L25" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::Branch - 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::Branch - 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>
|
||||
|
||||
|
@ -578,7 +578,7 @@
|
|||
Branch is a part of a branchable statement.
|
||||
For example, the branchable if statement contains 3 branches:</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="k">if</span> a <span class="o">=</span> something <span class="c"># --> Branch A</span>
|
||||
<pre><code><span class="k">if</span> a <span class="o">=</span> something <span class="c"># --> Branch A</span>
|
||||
a <span class="o">=</span> <span class="n">1</span> <span class="c"># --> Branch B</span>
|
||||
put a <span class="k">if</span> <span class="k">out</span> <span class="c"># --> Branch C</span>
|
||||
<span class="k">else</span>
|
||||
|
@ -607,6 +607,13 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L15" target="_blank">
|
||||
ameba/ast/branch.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -788,12 +795,14 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
<p>Creates a new branch.</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="t">Branch</span>.<span class="k">new</span>(if_node)</code></pre>
|
||||
<pre><code><span class="t">Branch</span>.<span class="k">new</span>(if_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L33" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -821,12 +830,14 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
<p>Constructs a new branch based on the node some parent scope.</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="t">Branch</span>.<span class="k">of</span>(assign_node, def_node)</code></pre>
|
||||
<pre><code><span class="t">Branch</span>.<span class="k">of</span>(assign_node, def_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L66" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -842,12 +853,14 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
<p>Constructs a new branch based on the node in scope.</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="t">Branch</span>.<span class="k">of</span>(assign_node, scope)</code></pre>
|
||||
<pre><code><span class="t">Branch</span>.<span class="k">of</span>(assign_node, scope)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L57" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -897,6 +910,8 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -911,6 +926,8 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -950,7 +967,7 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
<p>Returns true if current branch is in a loop, false - otherwise.
|
||||
For example, this branch is in a loop:</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="k">while</span> <span class="n">true</span>
|
||||
<pre><code><span class="k">while</span> <span class="n">true</span>
|
||||
handle_input <span class="c"># this branch is in a loop</span>
|
||||
<span class="k">if</span> wrong_input
|
||||
show_message <span class="c"># this branch is also in a loop.</span>
|
||||
|
@ -961,6 +978,8 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L48" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -975,6 +994,8 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -989,6 +1010,8 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1008,6 +1031,8 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1027,6 +1052,8 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1041,6 +1068,8 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1055,6 +1084,8 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branch.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::Branchable - 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::Branchable - 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>
|
||||
|
||||
|
@ -578,7 +578,7 @@
|
|||
For example, <code>Crystal::If</code>, <code>Crystal::Unless</code>, <code>Crystal::While</code>
|
||||
are branchables.</p>
|
||||
|
||||
<pre><code class="language-crystal">white a <span class="o">></span> <span class="n">100</span> <span class="c"># Branchable A</span>
|
||||
<pre><code>white a <span class="o">></span> <span class="n">100</span> <span class="c"># Branchable A</span>
|
||||
<span class="k">if</span> b <span class="o">></span> <span class="n">2</span> <span class="c"># Branchable B</span>
|
||||
a += <span class="n">1</span>
|
||||
<span class="k">end</span>
|
||||
|
@ -620,6 +620,13 @@ are branchables.</p>
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branchable.cr#L15" target="_blank">
|
||||
ameba/ast/branchable.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -820,12 +827,14 @@ are branchables.</p>
|
|||
|
||||
<p>Creates a new branchable</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="t">Branchable</span>.<span class="k">new</span>(node, parent_branchable)</code></pre>
|
||||
<pre><code><span class="t">Branchable</span>.<span class="k">new</span>(node, parent_branchable)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branchable.cr#L35" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -854,6 +863,8 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branchable.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -868,6 +879,8 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branchable.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -882,6 +895,8 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branchable.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -896,6 +911,8 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branchable.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -910,6 +927,8 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branchable.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -929,6 +948,8 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branchable.cr#L39" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -948,6 +969,8 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branchable.cr#L21" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -967,6 +990,8 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branchable.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -981,6 +1006,8 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branchable.cr#L26" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -995,6 +1022,8 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/branchable.cr#L26" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::CountingVisitor - 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::CountingVisitor - 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>
|
||||
|
||||
|
@ -598,6 +598,13 @@
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/counting_visitor.cr#L3" target="_blank">
|
||||
ameba/ast/visitors/counting_visitor.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -738,6 +745,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/counting_visitor.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -771,6 +780,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/counting_visitor.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -785,6 +796,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/counting_visitor.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -799,6 +812,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/counting_visitor.cr#L33" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::FlowExpression - 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::FlowExpression - 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>
|
||||
|
||||
|
@ -577,7 +577,7 @@
|
|||
<p>Represents a flow expression in Crystal code.
|
||||
For example,</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">foobar</span>
|
||||
<pre><code><span class="k">def</span> <span class="m">foobar</span>
|
||||
a <span class="o">=</span> <span class="n">3</span>
|
||||
<span class="k">return</span> <span class="n">42</span> <span class="c"># => flow expression</span>
|
||||
a <span class="o">+</span> <span class="n">1</span>
|
||||
|
@ -623,6 +623,13 @@ a parent node, which allows easily search through the related statement
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/flow_expression.cr#L18" target="_blank">
|
||||
ameba/ast/flow_expression.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -818,12 +825,14 @@ a parent node, which allows easily search through the related statement
|
|||
|
||||
<p>Creates a new flow expression.</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="t">FlowExpression</span>.<span class="k">new</span>(node, parent_node)</code></pre>
|
||||
<pre><code><span class="t">FlowExpression</span>.<span class="k">new</span>(node, parent_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/flow_expression.cr#L36" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -852,6 +861,8 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/flow_expression.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -866,6 +877,8 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/flow_expression.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -885,6 +898,8 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/flow_expression.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -899,6 +914,8 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/flow_expression.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -913,6 +930,8 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/flow_expression.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -932,6 +951,8 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/flow_expression.cr#L25" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -946,6 +967,8 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/flow_expression.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -960,6 +983,8 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/flow_expression.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -976,7 +1001,7 @@ a parent node, which allows easily search through the related statement
|
|||
<p>Returns nodes which can't be reached because of a flow command inside.
|
||||
For example:</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">foobar</span>
|
||||
<pre><code><span class="k">def</span> <span class="m">foobar</span>
|
||||
a <span class="o">=</span> <span class="n">1</span>
|
||||
<span class="k">return</span> <span class="n">42</span>
|
||||
|
||||
|
@ -987,6 +1012,8 @@ For example:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/flow_expression.cr#L50" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::FlowExpressionVisitor - 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::FlowExpressionVisitor - 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>
|
||||
|
||||
|
@ -612,6 +612,13 @@
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/flow_expression_visitor.cr#L6" target="_blank">
|
||||
ameba/ast/visitors/flow_expression_visitor.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -786,6 +793,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/flow_expression_visitor.cr#L12" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::InstanceVariable - 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::InstanceVariable - 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>
|
||||
|
||||
|
@ -587,6 +587,13 @@
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/ivariable.cr#L2" target="_blank">
|
||||
ameba/ast/variabling/ivariable.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -719,6 +726,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/ivariable.cr#L10" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -747,6 +756,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/ivariable.cr#L6" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -761,6 +772,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/ivariable.cr#L6" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -775,6 +788,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/ivariable.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -789,6 +804,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/ivariable.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -803,6 +820,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/ivariable.cr#L7" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -817,6 +836,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/ivariable.cr#L7" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -831,6 +852,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/ivariable.cr#L3" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -845,6 +868,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/ivariable.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -859,6 +884,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/ivariable.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::NodeVisitor - 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::NodeVisitor - 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>
|
||||
|
||||
|
@ -577,7 +577,7 @@
|
|||
<p>An AST Visitor that traverses the source and allows all nodes
|
||||
to be inspected by rules.</p>
|
||||
|
||||
<pre><code class="language-crystal">visitor <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">AST</span><span class="t">::</span><span class="t">NodeVisitor</span>.<span class="k">new</span>(rule, source)</code></pre>
|
||||
<pre><code>visitor <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">AST</span><span class="t">::</span><span class="t">NodeVisitor</span>.<span class="k">new</span>(rule, source)</code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -601,6 +601,13 @@ to be inspected by rules.</p>
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L39" target="_blank">
|
||||
ameba/ast/visitors/node_visitor.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -899,6 +906,8 @@ to be inspected by rules.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L42" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -933,6 +942,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -953,6 +964,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -973,6 +986,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -993,6 +1008,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1013,6 +1030,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1033,6 +1052,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1053,6 +1074,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1073,6 +1096,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1093,6 +1118,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1113,6 +1140,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1133,6 +1162,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1153,6 +1184,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1173,6 +1206,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1193,6 +1228,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1213,6 +1250,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1233,6 +1272,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1253,6 +1294,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1273,6 +1316,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1293,6 +1338,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1313,6 +1360,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1333,6 +1382,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1353,6 +1404,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1373,6 +1426,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1393,6 +1448,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1407,6 +1464,8 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/node_visitor.cr#L56" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::RedundantControlExpressionVisitor - 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::RedundantControlExpressionVisitor - 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>
|
||||
|
||||
|
@ -600,6 +600,13 @@ is reached.</p>
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L5" target="_blank">
|
||||
ameba/ast/visitors/redundant_control_expression_visitor.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -708,6 +715,8 @@ is reached.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L15" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -741,6 +750,8 @@ is reached.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L13" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -760,6 +771,8 @@ is reached.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L7" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -779,6 +792,8 @@ is reached.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L10" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::Reference - 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::Reference - 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>
|
||||
|
||||
|
@ -600,6 +600,13 @@ the variable from its reference.</p>
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/reference.cr#L7" target="_blank">
|
||||
ameba/ast/variabling/reference.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -807,6 +814,8 @@ the variable from its reference.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/reference.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -821,6 +830,8 @@ the variable from its reference.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/reference.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::Scope - 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::Scope - 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 @@ This is where the local variables belong to.</p>
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L6" target="_blank">
|
||||
ameba/ast/scope.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -887,12 +894,14 @@ This is where the local variables belong to.</p>
|
|||
|
||||
<p>Creates a new scope. Accepts the AST node and the outer scope.</p>
|
||||
|
||||
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)</code></pre>
|
||||
<pre><code>scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L39" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -945,13 +954,15 @@ This is where the local variables belong to.</p>
|
|||
|
||||
<p>Creates a new argument in the current scope.</p>
|
||||
|
||||
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
<pre><code>scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
scope.add_argument(arg_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L59" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -967,13 +978,15 @@ scope.add_argument(arg_node)</code></pre>
|
|||
|
||||
<p>Adds a new instance variable to the current scope.</p>
|
||||
|
||||
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
<pre><code>scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
scope.add_ivariable(ivar_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L70" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -989,13 +1002,15 @@ scope.add_ivariable(ivar_node)</code></pre>
|
|||
|
||||
<p>Creates a new variable in the current scope.</p>
|
||||
|
||||
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
<pre><code>scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
scope.add_variable(var_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L49" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1015,6 +1030,8 @@ scope.add_variable(var_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L155" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1034,6 +1051,8 @@ scope.add_variable(var_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L14" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1049,13 +1068,15 @@ scope.add_variable(var_node)</code></pre>
|
|||
|
||||
<p>Creates a new assignment for the variable.</p>
|
||||
|
||||
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
<pre><code>scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
scope.assign_variable(var_name, assign_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L90" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1075,6 +1096,8 @@ scope.assign_variable(var_name, assign_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L119" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1095,6 +1118,8 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L96" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1114,6 +1139,8 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L145" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1128,6 +1155,8 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1142,6 +1171,8 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1162,6 +1193,8 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L174" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1177,13 +1210,15 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
|
||||
<p>Returns variable by its name or nil if it does not exist.</p>
|
||||
|
||||
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
<pre><code>scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L80" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1226,6 +1261,8 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L114" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1245,6 +1282,8 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1264,6 +1303,8 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1278,6 +1319,8 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1292,6 +1335,8 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1311,6 +1356,8 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L26" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1330,6 +1377,8 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1349,6 +1398,8 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L11" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1369,6 +1420,8 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L137" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1384,7 +1437,7 @@ false if not.</p>
|
|||
|
||||
<p>Returns true if current scope represents a spawn block, e. g.</p>
|
||||
|
||||
<pre><code class="language-crystal">spawn <span class="k">do</span>
|
||||
<pre><code>spawn <span class="k">do</span>
|
||||
<span class="c"># ...</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
</div>
|
||||
|
@ -1392,6 +1445,8 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L107" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1406,6 +1461,8 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1420,6 +1477,8 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1439,6 +1498,8 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L150" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1459,6 +1520,8 @@ type definition, for example a class.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L126" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1478,6 +1541,8 @@ type definition, for example a class.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/scope.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::ScopeVisitor - 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::ScopeVisitor - 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>
|
||||
|
||||
|
@ -598,6 +598,13 @@
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/scope_visitor.cr#L5" target="_blank">
|
||||
ameba/ast/visitors/scope_visitor.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -735,6 +742,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/visitors/scope_visitor.cr#L13" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::Util - 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::Util - 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>
|
||||
|
||||
|
@ -628,6 +628,13 @@
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/util.cr#L2" target="_blank">
|
||||
ameba/ast/util.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -743,6 +750,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/util.cr#L141" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -762,6 +771,8 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/util.cr#L135" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -783,6 +794,8 @@ or special call node that interrupts execution (i.e. raise, exit, abort).</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/util.cr#L62" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -802,7 +815,7 @@ Node represents a flow expression if it is full-filled by a flow command.</p>
|
|||
<p>For example, this node is a flow expression, because each branch contains
|
||||
a flow command <code>return</code>:</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="k">if</span> a <span class="o">></span> <span class="n">0</span>
|
||||
<pre><code><span class="k">if</span> a <span class="o">></span> <span class="n">0</span>
|
||||
<span class="k">return</span> <span class="n">:positive</span>
|
||||
<span class="k">elsif</span> a <span class="o"><</span> <span class="n">0</span>
|
||||
<span class="k">return</span> <span class="n">:negative</span>
|
||||
|
@ -812,7 +825,7 @@ a flow command <code>return</code>:</p>
|
|||
|
||||
<p>This node is a not a flow expression:</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="k">if</span> a <span class="o">></span> <span class="n">0</span>
|
||||
<pre><code><span class="k">if</span> a <span class="o">></span> <span class="n">0</span>
|
||||
<span class="k">return</span> <span class="n">:positive</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
|
@ -822,6 +835,8 @@ a flow command <code>return</code>:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/util.cr#L101" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -841,6 +856,8 @@ a flow command <code>return</code>:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/util.cr#L4" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -860,6 +877,8 @@ a flow command <code>return</code>:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/util.cr#L147" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -881,6 +900,8 @@ to determine and cut a piece of source of the node.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/util.cr#L33" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -900,6 +921,8 @@ to determine and cut a piece of source of the node.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/util.cr#L129" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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::Variable - 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::Variable - 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>
|
||||
|
||||
|
@ -613,6 +613,13 @@ Holds the var node and variable assigments.</p>
|
|||
Defined in:
|
||||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L4" target="_blank">
|
||||
ameba/ast/variabling/variable.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -855,12 +862,14 @@ Holds the var node and variable assigments.</p>
|
|||
|
||||
<p>Creates a new variable(in the scope).</p>
|
||||
|
||||
<pre><code class="language-crystal"><span class="t">Variable</span>.<span class="k">new</span>(node, scope)</code></pre>
|
||||
<pre><code><span class="t">Variable</span>.<span class="k">new</span>(node, scope)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L31" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -891,7 +900,7 @@ Holds the var node and variable assigments.</p>
|
|||
<p>Assigns the variable (creates a new assignment).
|
||||
Variable may have multiple assignments.</p>
|
||||
|
||||
<pre><code class="language-crystal">variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
<pre><code>variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
variable.assign(node1)
|
||||
variable.assign(node2)
|
||||
variable.assignment.size <span class="c"># => 2</span></code></pre>
|
||||
|
@ -900,6 +909,8 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L49" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -919,6 +930,8 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -938,6 +951,8 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L6" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -955,18 +970,20 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
in the block. For example this variable is captured
|
||||
by block:</p>
|
||||
|
||||
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span>
|
||||
<pre><code>a <span class="o">=</span> <span class="n">1</span>
|
||||
<span class="n">3</span>.times { <span class="o">|</span>i<span class="o">|</span> a <span class="o">=</span> a <span class="o">+</span> i }</code></pre>
|
||||
|
||||
<p>And this variable is not captured by block.</p>
|
||||
|
||||
<pre><code class="language-crystal">i <span class="o">=</span> <span class="n">1</span>
|
||||
<pre><code>i <span class="o">=</span> <span class="n">1</span>
|
||||
<span class="n">3</span>.times { <span class="o">|</span>i<span class="o">|</span> i <span class="o">+</span> <span class="n">1</span> }</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L114" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -986,6 +1003,8 @@ by block:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L160" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1000,6 +1019,8 @@ by block:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L21" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1014,6 +1035,8 @@ by block:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L21" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1034,6 +1057,8 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L153" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1053,6 +1078,8 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L147" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1067,6 +1094,8 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1081,6 +1110,8 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1095,6 +1126,8 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1109,6 +1142,8 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1128,6 +1163,8 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L12" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1143,13 +1180,15 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
|
||||
<p>Creates a reference to this variable in some scope.</p>
|
||||
|
||||
<pre><code class="language-crystal">variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
<pre><code>variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
variable.reference(var_node, some_scope)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L73" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1165,7 +1204,7 @@ variable.reference(var_node, some_scope)</code></pre>
|
|||
|
||||
<p>Reference variable's assignments.</p>
|
||||
|
||||
<pre><code class="language-crystal">variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
<pre><code>variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
variable.assign(assign_node)
|
||||
variable.reference_assignments!</code></pre>
|
||||
</div>
|
||||
|
@ -1173,6 +1212,8 @@ variable.reference_assignments!</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L87" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1188,7 +1229,7 @@ variable.reference_assignments!</code></pre>
|
|||
|
||||
<p>Returns true if variable has any reference.</p>
|
||||
|
||||
<pre><code class="language-crystal">variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
<pre><code>variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
variable.reference(var_node)
|
||||
variable.referenced? <span class="c"># => true</span></code></pre>
|
||||
</div>
|
||||
|
@ -1196,6 +1237,8 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L62" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1215,6 +1258,8 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L9" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1234,6 +1279,8 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L15" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1253,6 +1300,8 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L35" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1273,6 +1322,8 @@ false otherwise.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L135" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1287,6 +1338,8 @@ false otherwise.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1301,6 +1354,8 @@ false otherwise.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1321,6 +1376,8 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/bedf3a68/src/ameba/ast/variabling/variable.cr#L125" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue