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 @ 48b15b9bf8
🚀
This commit is contained in:
parent
42809c9681
commit
f760465482
106 changed files with 5612 additions and 4623 deletions
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -641,9 +646,7 @@
|
|||
|
||||
<p>Represents the argument of some node.
|
||||
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)
|
||||
<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>
|
||||
|
@ -674,7 +677,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/argument.cr#L15" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/argument.cr#L15" target="_blank">
|
||||
ameba/ast/variabling/argument.cr
|
||||
</a>
|
||||
|
||||
|
@ -696,7 +699,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(node,variable)-class-method" class="signature"><strong>.new</strong>(node, variable)</a>
|
||||
<a href="#new%28node%2Cvariable%29-class-method" class="signature"><strong>.new</strong>(node, variable)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new argument.</p></div>
|
||||
|
||||
|
@ -719,29 +722,29 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options,&)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#ignored?-instance-method" class="signature"><strong>#ignored?</strong></a>
|
||||
<a href="#ignored%3F-instance-method" class="signature"><strong>#ignored?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if the name starts with '_', false if not.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options)-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options,&)-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -753,24 +756,24 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#node:Crystal::Var%7CCrystal::Arg-instance-method" class="signature"><strong>#node</strong> : Crystal::Var | Crystal::Arg</a>
|
||||
<a href="#node%3ACrystal%3A%3AVar%7CCrystal%3A%3AArg-instance-method" class="signature"><strong>#node</strong> : Crystal::Var | Crystal::Arg</a>
|
||||
|
||||
<div class="summary"><p>The actual node.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options,&)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#variable:Variable-instance-method" class="signature"><strong>#variable</strong> : Variable</a>
|
||||
<a href="#variable%3AVariable-instance-method" class="signature"><strong>#variable</strong> : Variable</a>
|
||||
|
||||
<div class="summary"><p>Variable of this argument (may be the same node)</p></div>
|
||||
|
||||
|
@ -821,20 +824,19 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
|
||||
def self.<strong>new</strong>(node, variable)
|
||||
|
||||
<a class="method-permalink" href="#new(node,variable)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28node%2Cvariable%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/argument.cr#L31" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/argument.cr#L31" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -858,29 +860,29 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
|
||||
def <strong>end_location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/argument.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/argument.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>end_location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/argument.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/argument.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -890,7 +892,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
|
||||
def <strong>ignored?</strong>
|
||||
|
||||
<a class="method-permalink" href="#ignored?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#ignored%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -901,7 +903,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/argument.cr#L35" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/argument.cr#L35" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -911,29 +913,29 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
|
||||
def <strong>location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/argument.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/argument.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/argument.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/argument.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -954,7 +956,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/argument.cr#L40" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/argument.cr#L40" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -964,7 +966,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
|
||||
def <strong>node</strong> : Crystal::Var | Crystal::Arg
|
||||
|
||||
<a class="method-permalink" href="#node:Crystal::Var%7CCrystal::Arg-instance-method">#</a>
|
||||
<a class="method-permalink" href="#node%3ACrystal%3A%3AVar%7CCrystal%3A%3AArg-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -975,7 +977,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/argument.cr#L17" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/argument.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -985,29 +987,29 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
|
||||
def <strong>to_s</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/argument.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/argument.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>to_s</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/argument.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/argument.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1017,7 +1019,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
|
||||
def <strong>variable</strong> : <a href="../../Ameba/AST/Variable.html">Variable</a>
|
||||
|
||||
<a class="method-permalink" href="#variable:Variable-instance-method">#</a>
|
||||
<a class="method-permalink" href="#variable%3AVariable-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1028,7 +1030,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/argument.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/argument.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -665,7 +670,7 @@ Holds the assign node and the variable.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L7" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L7" target="_blank">
|
||||
ameba/ast/variabling/assignment.cr
|
||||
</a>
|
||||
|
||||
|
@ -687,7 +692,7 @@ Holds the assign node and the variable.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(node,variable,scope)-class-method" class="signature"><strong>.new</strong>(node, variable, scope)</a>
|
||||
<a href="#new%28node%2Cvariable%2Cscope%29-class-method" class="signature"><strong>.new</strong>(node, variable, scope)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new assignment.</p></div>
|
||||
|
||||
|
@ -710,70 +715,70 @@ Holds the assign node and the variable.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#branch:Branch?-instance-method" class="signature"><strong>#branch</strong> : Branch?</a>
|
||||
<a href="#branch%3ABranch%3F-instance-method" class="signature"><strong>#branch</strong> : Branch?</a>
|
||||
|
||||
<div class="summary"><p>Branch of this assignment.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options,&)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#in_branch?-instance-method" class="signature"><strong>#in_branch?</strong></a>
|
||||
<a href="#in_branch%3F-instance-method" class="signature"><strong>#in_branch?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if this assignment is in a branch, false if not.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options)-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options,&)-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#node:Crystal::ASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
|
||||
<a href="#node%3ACrystal%3A%3AASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
|
||||
|
||||
<div class="summary"><p>The actual assignment node.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#op_assign?-instance-method" class="signature"><strong>#op_assign?</strong></a>
|
||||
<a href="#op_assign%3F-instance-method" class="signature"><strong>#op_assign?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if this assignment is an op assign, false if not.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#referenced=(referenced)-instance-method" class="signature"><strong>#referenced=</strong>(referenced)</a>
|
||||
<a href="#referenced%3D%28referenced%29-instance-method" class="signature"><strong>#referenced=</strong>(referenced)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#referenced?:Bool-instance-method" class="signature"><strong>#referenced?</strong> : Bool</a>
|
||||
<a href="#referenced%3F%3ABool-instance-method" class="signature"><strong>#referenced?</strong> : Bool</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#referenced_in_loop?-instance-method" class="signature"><strong>#referenced_in_loop?</strong></a>
|
||||
<a href="#referenced_in_loop%3F-instance-method" class="signature"><strong>#referenced_in_loop?</strong></a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#scope:Scope-instance-method" class="signature"><strong>#scope</strong> : Scope</a>
|
||||
<a href="#scope%3AScope-instance-method" class="signature"><strong>#scope</strong> : Scope</a>
|
||||
|
||||
<div class="summary"><p>A scope assignment belongs to</p></div>
|
||||
|
||||
|
@ -787,24 +792,24 @@ Holds the assign node and the variable.</p>
|
|||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options,&)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#transformed?-instance-method" class="signature"><strong>#transformed?</strong></a>
|
||||
<a href="#transformed%3F-instance-method" class="signature"><strong>#transformed?</strong></a>
|
||||
|
||||
<div class="summary"><p>Indicates whether the node is a transformed assignment by the compiler.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#variable:Variable-instance-method" class="signature"><strong>#variable</strong> : Variable</a>
|
||||
<a href="#variable%3AVariable-instance-method" class="signature"><strong>#variable</strong> : Variable</a>
|
||||
|
||||
<div class="summary"><p>Variable of this assignment.</p></div>
|
||||
|
||||
|
@ -855,20 +860,19 @@ Holds the assign node and the variable.</p>
|
|||
|
||||
def self.<strong>new</strong>(node, variable, scope)
|
||||
|
||||
<a class="method-permalink" href="#new(node,variable,scope)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28node%2Cvariable%2Cscope%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L31" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L31" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -892,7 +896,7 @@ Holds the assign node and the variable.</p>
|
|||
|
||||
def <strong>branch</strong> : <a href="../../Ameba/AST/Branch.html">Branch</a>?
|
||||
|
||||
<a class="method-permalink" href="#branch:Branch?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#branch%3ABranch%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -903,23 +907,7 @@ Holds the assign node and the variable.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>end_location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options,&)-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -929,13 +917,29 @@ Holds the assign node and the variable.</p>
|
|||
|
||||
def <strong>end_location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>end_location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -945,21 +949,20 @@ Holds the assign node and the variable.</p>
|
|||
|
||||
def <strong>in_branch?</strong>
|
||||
|
||||
<a class="method-permalink" href="#in_branch?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#in_branch%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L60" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L60" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -969,29 +972,29 @@ For example, this assignment is in a branch:</p>
|
|||
|
||||
def <strong>location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1001,7 +1004,7 @@ For example, this assignment is in a branch:</p>
|
|||
|
||||
def <strong>node</strong> : Crystal::ASTNode
|
||||
|
||||
<a class="method-permalink" href="#node:Crystal::ASTNode-instance-method">#</a>
|
||||
<a class="method-permalink" href="#node%3ACrystal%3A%3AASTNode-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1012,7 +1015,7 @@ For example, this assignment is in a branch:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L11" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L11" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1022,21 +1025,20 @@ For example, this assignment is in a branch:</p>
|
|||
|
||||
def <strong>op_assign?</strong>
|
||||
|
||||
<a class="method-permalink" href="#op_assign?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#op_assign%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L50" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L50" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1046,13 +1048,13 @@ For example, this is an op assign:</p>
|
|||
|
||||
def <strong>referenced=</strong>(referenced)
|
||||
|
||||
<a class="method-permalink" href="#referenced=(referenced)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#referenced%3D%28referenced%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1062,13 +1064,13 @@ For example, this is an op assign:</p>
|
|||
|
||||
def <strong>referenced?</strong> : Bool
|
||||
|
||||
<a class="method-permalink" href="#referenced?:Bool-instance-method">#</a>
|
||||
<a class="method-permalink" href="#referenced%3F%3ABool-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1078,13 +1080,13 @@ For example, this is an op assign:</p>
|
|||
|
||||
def <strong>referenced_in_loop?</strong>
|
||||
|
||||
<a class="method-permalink" href="#referenced_in_loop?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#referenced_in_loop%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L40" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L40" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1094,7 +1096,7 @@ For example, this is an op assign:</p>
|
|||
|
||||
def <strong>scope</strong> : <a href="../../Ameba/AST/Scope.html">Scope</a>
|
||||
|
||||
<a class="method-permalink" href="#scope:Scope-instance-method">#</a>
|
||||
<a class="method-permalink" href="#scope%3AScope-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1105,7 +1107,7 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1126,23 +1128,7 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L65" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>to_s</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options,&)-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L65" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1152,13 +1138,29 @@ For example, this is an op assign:</p>
|
|||
|
||||
def <strong>to_s</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>to_s</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1168,20 +1170,17 @@ For example, this is an op assign:</p>
|
|||
|
||||
def <strong>transformed?</strong>
|
||||
|
||||
<a class="method-permalink" href="#transformed?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#transformed%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
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>
|
||||
a <span class="o">=</span> __arg0[<span class="n">0</span>]
|
||||
b <span class="o">=</span> __arg0[<span class="n">1</span>]
|
||||
|
@ -1192,7 +1191,7 @@ i.e.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L97" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L97" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1202,7 +1201,7 @@ i.e.</p>
|
|||
|
||||
def <strong>variable</strong> : <a href="../../Ameba/AST/Variable.html">Variable</a>
|
||||
|
||||
<a class="method-permalink" href="#variable:Variable-instance-method">#</a>
|
||||
<a class="method-permalink" href="#variable%3AVariable-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1213,7 +1212,7 @@ i.e.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/assignment.cr#L14" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/assignment.cr#L14" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -682,7 +687,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/base_visitor.cr#L6" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/base_visitor.cr#L6" target="_blank">
|
||||
ameba/ast/visitors/base_visitor.cr
|
||||
</a>
|
||||
|
||||
|
@ -704,7 +709,7 @@
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(rule,source)-class-method" class="signature"><strong>.new</strong>(rule, source)</a>
|
||||
<a href="#new%28rule%2Csource%29-class-method" class="signature"><strong>.new</strong>(rule, source)</a>
|
||||
|
||||
<div class="summary"><p>Creates instance of this visitor.</p></div>
|
||||
|
||||
|
@ -727,7 +732,7 @@
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#visit(node:Crystal::ASTNode)-instance-method" class="signature"><strong>#visit</strong>(node : Crystal::ASTNode)</a>
|
||||
<a href="#visit%28node%3ACrystal%3A%3AASTNode%29-instance-method" class="signature"><strong>#visit</strong>(node : Crystal::ASTNode)</a>
|
||||
|
||||
<div class="summary"><p>A main visit method that accepts <code>Crystal::ASTNode</code>.</p></div>
|
||||
|
||||
|
@ -788,20 +793,19 @@
|
|||
|
||||
def self.<strong>new</strong>(rule, source)
|
||||
|
||||
<a class="method-permalink" href="#new(rule,source)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28rule%2Csource%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/base_visitor.cr#L18" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/base_visitor.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -825,7 +829,7 @@
|
|||
|
||||
def <strong>visit</strong>(node : Crystal::ASTNode)
|
||||
|
||||
<a class="method-permalink" href="#visit(node:Crystal::ASTNode)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#visit%28node%3ACrystal%3A%3AASTNode%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -837,7 +841,7 @@ Returns true meaning all child nodes will be traversed.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/base_visitor.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/base_visitor.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -642,7 +647,6 @@
|
|||
<p>Represents the branch in Crystal code.
|
||||
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>
|
||||
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>
|
||||
|
@ -673,7 +677,7 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L15" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L15" target="_blank">
|
||||
ameba/ast/branch.cr
|
||||
</a>
|
||||
|
||||
|
@ -695,7 +699,7 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(node,parent)-class-method" class="signature"><strong>.new</strong>(node, parent)</a>
|
||||
<a href="#new%28node%2Cparent%29-class-method" class="signature"><strong>.new</strong>(node, parent)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new branch.</p></div>
|
||||
|
||||
|
@ -716,14 +720,14 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#of(node:Crystal::ASTNode,parent_node:Crystal::ASTNode)-class-method" class="signature"><strong>.of</strong>(node : Crystal::ASTNode, parent_node : Crystal::ASTNode)</a>
|
||||
<a href="#of%28node%3ACrystal%3A%3AASTNode%2Cparent_node%3ACrystal%3A%3AASTNode%29-class-method" class="signature"><strong>.of</strong>(node : Crystal::ASTNode, parent_node : Crystal::ASTNode)</a>
|
||||
|
||||
<div class="summary"><p>Constructs a new branch based on the node some parent scope.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#of(node:Crystal::ASTNode,scope:Scope)-class-method" class="signature"><strong>.of</strong>(node : Crystal::ASTNode, scope : Scope)</a>
|
||||
<a href="#of%28node%3ACrystal%3A%3AASTNode%2Cscope%3AScope%29-class-method" class="signature"><strong>.of</strong>(node : Crystal::ASTNode, scope : Scope)</a>
|
||||
|
||||
<div class="summary"><p>Constructs a new branch based on the node in scope.</p></div>
|
||||
|
||||
|
@ -744,67 +748,67 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#==(other:self)-instance-method" class="signature"><strong>#==</strong>(other : <span class="k">self</span>)</a>
|
||||
<a href="#%3D%3D%28other%3Aself%29-instance-method" class="signature"><strong>#==</strong>(other : <span class="k">self</span>)</a>
|
||||
|
||||
<div class="summary"><p>Returns <code>true</code> if this reference is the same as <em>other</em>.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options,&)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#hash(hasher)-instance-method" class="signature"><strong>#hash</strong>(hasher)</a>
|
||||
<a href="#hash%28hasher%29-instance-method" class="signature"><strong>#hash</strong>(hasher)</a>
|
||||
|
||||
<div class="summary"><p>See <code>Object#hash(hasher)</code></p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#in_loop?-instance-method" class="signature"><strong>#in_loop?</strong></a>
|
||||
<a href="#in_loop%3F-instance-method" class="signature"><strong>#in_loop?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if current branch is in a loop, false - otherwise.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options)-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options,&)-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#node:Crystal::ASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
|
||||
<a href="#node%3ACrystal%3A%3AASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
|
||||
|
||||
<div class="summary"><p>The actual branch node.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#parent:Branchable-instance-method" class="signature"><strong>#parent</strong> : Branchable</a>
|
||||
<a href="#parent%3ABranchable-instance-method" class="signature"><strong>#parent</strong> : Branchable</a>
|
||||
|
||||
<div class="summary"><p>The parent branchable.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options,&)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -853,20 +857,19 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
def self.<strong>new</strong>(node, parent)
|
||||
|
||||
<a class="method-permalink" href="#new(node,parent)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28node%2Cparent%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L33" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L33" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -888,20 +891,19 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
def self.<strong>of</strong>(node : Crystal::ASTNode, parent_node : Crystal::ASTNode)
|
||||
|
||||
<a class="method-permalink" href="#of(node:Crystal::ASTNode,parent_node:Crystal::ASTNode)-class-method">#</a>
|
||||
<a class="method-permalink" href="#of%28node%3ACrystal%3A%3AASTNode%2Cparent_node%3ACrystal%3A%3AASTNode%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L65" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L65" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -911,20 +913,19 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
def self.<strong>of</strong>(node : Crystal::ASTNode, scope : <a href="../../Ameba/AST/Scope.html">Scope</a>)
|
||||
|
||||
<a class="method-permalink" href="#of(node:Crystal::ASTNode,scope:Scope)-class-method">#</a>
|
||||
<a class="method-permalink" href="#of%28node%3ACrystal%3A%3AASTNode%2Cscope%3AScope%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L56" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L56" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -946,7 +947,7 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
def <strong>==</strong>(other : <span class="k">self</span>)
|
||||
|
||||
<a class="method-permalink" href="#==(other:self)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#%3D%3D%28other%3Aself%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -969,29 +970,29 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
def <strong>end_location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>end_location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1001,7 +1002,7 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
def <strong>hash</strong>(hasher)
|
||||
|
||||
<a class="method-permalink" href="#hash(hasher)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#hash%28hasher%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1024,14 +1025,13 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
def <strong>in_loop?</strong>
|
||||
|
||||
<a class="method-permalink" href="#in_loop?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#in_loop%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
handle_input <span class="c"># this branch is in a loop</span>
|
||||
<span class="k">if</span> wrong_input
|
||||
|
@ -1043,7 +1043,7 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1053,29 +1053,29 @@ For example, this branch is in a loop:</p>
|
|||
|
||||
def <strong>location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1085,7 +1085,7 @@ For example, this branch is in a loop:</p>
|
|||
|
||||
def <strong>node</strong> : Crystal::ASTNode
|
||||
|
||||
<a class="method-permalink" href="#node:Crystal::ASTNode-instance-method">#</a>
|
||||
<a class="method-permalink" href="#node%3ACrystal%3A%3AASTNode-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1096,7 +1096,7 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L17" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1106,7 +1106,7 @@ For example, this branch is in a loop:</p>
|
|||
|
||||
def <strong>parent</strong> : <a href="../../Ameba/AST/Branchable.html">Branchable</a>
|
||||
|
||||
<a class="method-permalink" href="#parent:Branchable-instance-method">#</a>
|
||||
<a class="method-permalink" href="#parent%3ABranchable-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1117,7 +1117,7 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1127,29 +1127,29 @@ For example, this branch is in a loop:</p>
|
|||
|
||||
def <strong>to_s</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>to_s</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branch.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branch.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -642,7 +647,6 @@
|
|||
<p>A generic entity to represent a branchable Crystal node.
|
||||
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>
|
||||
<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>
|
||||
|
@ -686,7 +690,7 @@ are branchables.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branchable.cr#L15" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branchable.cr#L15" target="_blank">
|
||||
ameba/ast/branchable.cr
|
||||
</a>
|
||||
|
||||
|
@ -708,7 +712,7 @@ are branchables.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(node,parent=nil)-class-method" class="signature"><strong>.new</strong>(node, parent = <span class="n">nil</span>)</a>
|
||||
<a href="#new%28node%2Cparent%3Dnil%29-class-method" class="signature"><strong>.new</strong>(node, parent = <span class="n">nil</span>)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new branchable</p></div>
|
||||
|
||||
|
@ -731,58 +735,58 @@ are branchables.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#branches:Array(Crystal::ASTNode)-instance-method" class="signature"><strong>#branches</strong> : Array(Crystal::ASTNode)</a>
|
||||
<a href="#branches%3AArray%28Crystal%3A%3AASTNode%29-instance-method" class="signature"><strong>#branches</strong> : Array(Crystal::ASTNode)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options,&)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options)-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options,&)-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#loop?-instance-method" class="signature"><strong>#loop?</strong></a>
|
||||
<a href="#loop%3F-instance-method" class="signature"><strong>#loop?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if this node or one of the parent branchables is a loop, false otherwise.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#node:Crystal::ASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
|
||||
<a href="#node%3ACrystal%3A%3AASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
|
||||
|
||||
<div class="summary"><p>The actual Crystal node.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#parent:Branchable?-instance-method" class="signature"><strong>#parent</strong> : Branchable?</a>
|
||||
<a href="#parent%3ABranchable%3F-instance-method" class="signature"><strong>#parent</strong> : Branchable?</a>
|
||||
|
||||
<div class="summary"><p>Parent branchable (if any)</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options,&)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -799,44 +803,49 @@ are branchables.</p>
|
|||
<h3>Instance methods inherited from module <code><a href="../../Ameba/AST/Util.html">Ameba::AST::Util</a></code></h3>
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#abort?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#abort%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>abort?(node)</span>
|
||||
abort?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#exit?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#exit%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>exit?(node)</span>
|
||||
exit?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#flow_command?(node,in_loop)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#flow_command%3F%28node%2Cin_loop%29-instance-method" class="tooltip">
|
||||
<span>flow_command?(node, in_loop)</span>
|
||||
flow_command?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#flow_expression?(node,in_loop=false)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#flow_expression%3F%28node%2Cin_loop%3Dfalse%29-instance-method" class="tooltip">
|
||||
<span>flow_expression?(node, in_loop = <span class="n">false</span>)</span>
|
||||
flow_expression?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#literal?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#literal%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>literal?(node)</span>
|
||||
literal?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#loop?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#loop%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>loop?(node)</span>
|
||||
loop?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#node_source(node,code_lines)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#node_source%28node%2Ccode_lines%29-instance-method" class="tooltip">
|
||||
<span>node_source(node, code_lines)</span>
|
||||
node_source</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#raise?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#raise%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>raise?(node)</span>
|
||||
raise?</a>
|
||||
raise?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#source_between%28loc%2Cend_loc%2Ccode_lines%29%3AString%3F-instance-method" class="tooltip">
|
||||
<span>source_between(loc, end_loc, code_lines) : String?</span>
|
||||
source_between</a>
|
||||
|
||||
|
||||
|
||||
|
@ -885,20 +894,19 @@ are branchables.</p>
|
|||
|
||||
def self.<strong>new</strong>(node, parent = <span class="n">nil</span>)
|
||||
|
||||
<a class="method-permalink" href="#new(node,parent=nil)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28node%2Cparent%3Dnil%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branchable.cr#L35" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branchable.cr#L35" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -922,13 +930,13 @@ are branchables.</p>
|
|||
|
||||
def <strong>branches</strong> : Array(Crystal::ASTNode)
|
||||
|
||||
<a class="method-permalink" href="#branches:Array(Crystal::ASTNode)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#branches%3AArray%28Crystal%3A%3AASTNode%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branchable.cr#L18" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branchable.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -938,29 +946,29 @@ are branchables.</p>
|
|||
|
||||
def <strong>end_location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branchable.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branchable.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>end_location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branchable.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branchable.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -970,29 +978,29 @@ are branchables.</p>
|
|||
|
||||
def <strong>location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branchable.cr#L27" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branchable.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branchable.cr#L27" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branchable.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1002,7 +1010,7 @@ are branchables.</p>
|
|||
|
||||
def <strong>loop?</strong>
|
||||
|
||||
<a class="method-permalink" href="#loop?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#loop%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1013,7 +1021,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branchable.cr#L39" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branchable.cr#L39" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1023,7 +1031,7 @@ are branchables.</p>
|
|||
|
||||
def <strong>node</strong> : Crystal::ASTNode
|
||||
|
||||
<a class="method-permalink" href="#node:Crystal::ASTNode-instance-method">#</a>
|
||||
<a class="method-permalink" href="#node%3ACrystal%3A%3AASTNode-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1034,7 +1042,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branchable.cr#L21" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branchable.cr#L21" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1044,7 +1052,7 @@ are branchables.</p>
|
|||
|
||||
def <strong>parent</strong> : <a href="../../Ameba/AST/Branchable.html">Branchable</a>?
|
||||
|
||||
<a class="method-permalink" href="#parent:Branchable?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#parent%3ABranchable%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1055,7 +1063,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branchable.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branchable.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1065,29 +1073,29 @@ are branchables.</p>
|
|||
|
||||
def <strong>to_s</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branchable.cr#L26" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branchable.cr#L26" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>to_s</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/branchable.cr#L26" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/branchable.cr#L26" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -664,7 +669,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/counting_visitor.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/counting_visitor.cr#L3" target="_blank">
|
||||
ameba/ast/visitors/counting_visitor.cr
|
||||
</a>
|
||||
|
||||
|
@ -705,7 +710,7 @@
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(scope:Crystal::ASTNode)-class-method" class="signature"><strong>.new</strong>(scope : Crystal::ASTNode)</a>
|
||||
<a href="#new%28scope%3ACrystal%3A%3AASTNode%29-class-method" class="signature"><strong>.new</strong>(scope : Crystal::ASTNode)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new counting visitor</p></div>
|
||||
|
||||
|
@ -735,12 +740,12 @@
|
|||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#macro_condition:Bool-instance-method" class="signature"><strong>#macro_condition</strong> : Bool</a>
|
||||
<a href="#macro_condition%3ABool-instance-method" class="signature"><strong>#macro_condition</strong> : Bool</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#visit(node:Crystal::MacroIf%7CCrystal::MacroFor)-instance-method" class="signature"><strong>#visit</strong>(node : Crystal::MacroIf | Crystal::MacroFor)</a>
|
||||
<a href="#visit%28node%3ACrystal%3A%3AMacroIf%7CCrystal%3A%3AMacroFor%29-instance-method" class="signature"><strong>#visit</strong>(node : Crystal::MacroIf | Crystal::MacroFor)</a>
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -799,7 +804,7 @@
|
|||
|
||||
def self.<strong>new</strong>(scope : Crystal::ASTNode)
|
||||
|
||||
<a class="method-permalink" href="#new(scope:Crystal::ASTNode)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28scope%3ACrystal%3A%3AASTNode%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -810,7 +815,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/counting_visitor.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/counting_visitor.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -845,7 +850,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/counting_visitor.cr#L18" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/counting_visitor.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -855,13 +860,13 @@
|
|||
|
||||
def <strong>macro_condition</strong> : Bool
|
||||
|
||||
<a class="method-permalink" href="#macro_condition:Bool-instance-method">#</a>
|
||||
<a class="method-permalink" href="#macro_condition%3ABool-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/counting_visitor.cr#L5" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/counting_visitor.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -871,13 +876,13 @@
|
|||
|
||||
def <strong>visit</strong>(node : Crystal::MacroIf | Crystal::MacroFor)
|
||||
|
||||
<a class="method-permalink" href="#visit(node:Crystal::MacroIf%7CCrystal::MacroFor)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#visit%28node%3ACrystal%3A%3AMacroIf%7CCrystal%3A%3AMacroFor%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/counting_visitor.cr#L44" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/counting_visitor.cr#L44" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -641,13 +646,11 @@
|
|||
|
||||
<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>
|
||||
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>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>Flow expression contains an actual node of a control expression and
|
||||
a parent node, which allows easily search through the related statement
|
||||
(i.e. find unreachable code)</p>
|
||||
|
@ -689,7 +692,7 @@ a parent node, which allows easily search through the related statement
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/flow_expression.cr#L18" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/flow_expression.cr#L18" target="_blank">
|
||||
ameba/ast/flow_expression.cr
|
||||
</a>
|
||||
|
||||
|
@ -711,7 +714,7 @@ a parent node, which allows easily search through the related statement
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(node,in_loop)-class-method" class="signature"><strong>.new</strong>(node, in_loop)</a>
|
||||
<a href="#new%28node%2Cin_loop%29-class-method" class="signature"><strong>.new</strong>(node, in_loop)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new flow expression.</p></div>
|
||||
|
||||
|
@ -734,46 +737,46 @@ a parent node, which allows easily search through the related statement
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options,&)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#in_loop?:Bool-instance-method" class="signature"><strong>#in_loop?</strong> : Bool</a>
|
||||
<a href="#in_loop%3F%3ABool-instance-method" class="signature"><strong>#in_loop?</strong> : Bool</a>
|
||||
|
||||
<div class="summary"><p>Is true only if some of the nodes parents is a loop.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options)-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options,&)-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#node:Crystal::ASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
|
||||
<a href="#node%3ACrystal%3A%3AASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
|
||||
|
||||
<div class="summary"><p>The actual node of the flow expression.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options,&)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -797,44 +800,49 @@ a parent node, which allows easily search through the related statement
|
|||
<h3>Instance methods inherited from module <code><a href="../../Ameba/AST/Util.html">Ameba::AST::Util</a></code></h3>
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#abort?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#abort%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>abort?(node)</span>
|
||||
abort?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#exit?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#exit%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>exit?(node)</span>
|
||||
exit?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#flow_command?(node,in_loop)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#flow_command%3F%28node%2Cin_loop%29-instance-method" class="tooltip">
|
||||
<span>flow_command?(node, in_loop)</span>
|
||||
flow_command?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#flow_expression?(node,in_loop=false)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#flow_expression%3F%28node%2Cin_loop%3Dfalse%29-instance-method" class="tooltip">
|
||||
<span>flow_expression?(node, in_loop = <span class="n">false</span>)</span>
|
||||
flow_expression?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#literal?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#literal%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>literal?(node)</span>
|
||||
literal?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#loop?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#loop%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>loop?(node)</span>
|
||||
loop?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#node_source(node,code_lines)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#node_source%28node%2Ccode_lines%29-instance-method" class="tooltip">
|
||||
<span>node_source(node, code_lines)</span>
|
||||
node_source</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#raise?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#raise%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>raise?(node)</span>
|
||||
raise?</a>
|
||||
raise?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#source_between%28loc%2Cend_loc%2Ccode_lines%29%3AString%3F-instance-method" class="tooltip">
|
||||
<span>source_between(loc, end_loc, code_lines) : String?</span>
|
||||
source_between</a>
|
||||
|
||||
|
||||
|
||||
|
@ -883,20 +891,19 @@ a parent node, which allows easily search through the related statement
|
|||
|
||||
def self.<strong>new</strong>(node, in_loop)
|
||||
|
||||
<a class="method-permalink" href="#new(node,in_loop)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28node%2Cin_loop%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/flow_expression.cr#L36" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/flow_expression.cr#L36" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -920,29 +927,29 @@ a parent node, which allows easily search through the related statement
|
|||
|
||||
def <strong>end_location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/flow_expression.cr#L29" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/flow_expression.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>end_location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/flow_expression.cr#L29" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/flow_expression.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -952,7 +959,7 @@ a parent node, which allows easily search through the related statement
|
|||
|
||||
def <strong>in_loop?</strong> : Bool
|
||||
|
||||
<a class="method-permalink" href="#in_loop?:Bool-instance-method">#</a>
|
||||
<a class="method-permalink" href="#in_loop%3F%3ABool-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -963,7 +970,7 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/flow_expression.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/flow_expression.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -973,29 +980,29 @@ a parent node, which allows easily search through the related statement
|
|||
|
||||
def <strong>location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/flow_expression.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/flow_expression.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/flow_expression.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/flow_expression.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1005,7 +1012,7 @@ a parent node, which allows easily search through the related statement
|
|||
|
||||
def <strong>node</strong> : Crystal::ASTNode
|
||||
|
||||
<a class="method-permalink" href="#node:Crystal::ASTNode-instance-method">#</a>
|
||||
<a class="method-permalink" href="#node%3ACrystal%3A%3AASTNode-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1016,7 +1023,7 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/flow_expression.cr#L25" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/flow_expression.cr#L25" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1026,29 +1033,29 @@ a parent node, which allows easily search through the related statement
|
|||
|
||||
def <strong>to_s</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/flow_expression.cr#L27" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/flow_expression.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>to_s</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/flow_expression.cr#L27" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/flow_expression.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1065,7 +1072,6 @@ 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>
|
||||
a <span class="o">=</span> <span class="n">1</span>
|
||||
<span class="k">return</span> <span class="n">42</span>
|
||||
|
@ -1077,7 +1083,7 @@ For example:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/flow_expression.cr#L50" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/flow_expression.cr#L50" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -678,7 +683,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/flow_expression_visitor.cr#L6" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/flow_expression_visitor.cr#L6" target="_blank">
|
||||
ameba/ast/visitors/flow_expression_visitor.cr
|
||||
</a>
|
||||
|
||||
|
@ -700,7 +705,7 @@
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(rule,source)-class-method" class="signature"><strong>.new</strong>(rule, source)</a>
|
||||
<a href="#new%28rule%2Csource%29-class-method" class="signature"><strong>.new</strong>(rule, source)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new flow expression visitor.</p></div>
|
||||
|
||||
|
@ -723,44 +728,49 @@
|
|||
<h3>Instance methods inherited from module <code><a href="../../Ameba/AST/Util.html">Ameba::AST::Util</a></code></h3>
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#abort?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#abort%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>abort?(node)</span>
|
||||
abort?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#exit?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#exit%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>exit?(node)</span>
|
||||
exit?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#flow_command?(node,in_loop)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#flow_command%3F%28node%2Cin_loop%29-instance-method" class="tooltip">
|
||||
<span>flow_command?(node, in_loop)</span>
|
||||
flow_command?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#flow_expression?(node,in_loop=false)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#flow_expression%3F%28node%2Cin_loop%3Dfalse%29-instance-method" class="tooltip">
|
||||
<span>flow_expression?(node, in_loop = <span class="n">false</span>)</span>
|
||||
flow_expression?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#literal?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#literal%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>literal?(node)</span>
|
||||
literal?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#loop?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#loop%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>loop?(node)</span>
|
||||
loop?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#node_source(node,code_lines)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#node_source%28node%2Ccode_lines%29-instance-method" class="tooltip">
|
||||
<span>node_source(node, code_lines)</span>
|
||||
node_source</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#raise?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Util.html#raise%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>raise?(node)</span>
|
||||
raise?</a>
|
||||
raise?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Util.html#source_between%28loc%2Cend_loc%2Ccode_lines%29%3AString%3F-instance-method" class="tooltip">
|
||||
<span>source_between(loc, end_loc, code_lines) : String?</span>
|
||||
source_between</a>
|
||||
|
||||
|
||||
|
||||
|
@ -777,7 +787,7 @@
|
|||
<h3>Instance methods inherited from class <code><a href="../../Ameba/AST/BaseVisitor.html">Ameba::AST::BaseVisitor</a></code></h3>
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/BaseVisitor.html#visit(node:Crystal::ASTNode)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/BaseVisitor.html#visit%28node%3ACrystal%3A%3AASTNode%29-instance-method" class="tooltip">
|
||||
<span>visit(node : Crystal::ASTNode)</span>
|
||||
visit</a>
|
||||
|
||||
|
@ -789,7 +799,7 @@
|
|||
<h3>Constructor methods inherited from class <code><a href="../../Ameba/AST/BaseVisitor.html">Ameba::AST::BaseVisitor</a></code></h3>
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/BaseVisitor.html#new(rule,source)-class-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/BaseVisitor.html#new%28rule%2Csource%29-class-method" class="tooltip">
|
||||
<span>new(rule, source)</span>
|
||||
new</a>
|
||||
|
||||
|
@ -847,7 +857,7 @@
|
|||
|
||||
def self.<strong>new</strong>(rule, source)
|
||||
|
||||
<a class="method-permalink" href="#new(rule,source)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28rule%2Csource%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -858,7 +868,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/flow_expression_visitor.cr#L12" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/flow_expression_visitor.cr#L12" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -653,7 +658,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/ivariable.cr#L2" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/ivariable.cr#L2" target="_blank">
|
||||
ameba/ast/variabling/ivariable.cr
|
||||
</a>
|
||||
|
||||
|
@ -675,7 +680,7 @@
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(node)-class-method" class="signature"><strong>.new</strong>(node)</a>
|
||||
<a href="#new%28node%29-class-method" class="signature"><strong>.new</strong>(node)</a>
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -696,47 +701,47 @@
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options,&)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options)-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options,&)-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#name(*args,**options)-instance-method" class="signature"><strong>#name</strong>(*args, **options)</a>
|
||||
<a href="#name%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#name</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#name(*args,**options,&)-instance-method" class="signature"><strong>#name</strong>(*args, **options, &)</a>
|
||||
<a href="#name%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#name</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#node:Crystal::InstanceVar-instance-method" class="signature"><strong>#node</strong> : Crystal::InstanceVar</a>
|
||||
<a href="#node%3ACrystal%3A%3AInstanceVar-instance-method" class="signature"><strong>#node</strong> : Crystal::InstanceVar</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options,&)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -785,13 +790,13 @@
|
|||
|
||||
def self.<strong>new</strong>(node)
|
||||
|
||||
<a class="method-permalink" href="#new(node)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28node%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/ivariable.cr#L10" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/ivariable.cr#L10" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -815,29 +820,29 @@
|
|||
|
||||
def <strong>end_location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/ivariable.cr#L6" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/ivariable.cr#L6" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>end_location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/ivariable.cr#L6" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/ivariable.cr#L6" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -847,29 +852,29 @@
|
|||
|
||||
def <strong>location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/ivariable.cr#L5" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/ivariable.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/ivariable.cr#L5" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/ivariable.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -879,29 +884,29 @@
|
|||
|
||||
def <strong>name</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#name(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#name%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/ivariable.cr#L7" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/ivariable.cr#L7" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="name(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="name(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>name</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#name(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#name%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/ivariable.cr#L7" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/ivariable.cr#L7" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -911,13 +916,13 @@
|
|||
|
||||
def <strong>node</strong> : Crystal::InstanceVar
|
||||
|
||||
<a class="method-permalink" href="#node:Crystal::InstanceVar-instance-method">#</a>
|
||||
<a class="method-permalink" href="#node%3ACrystal%3A%3AInstanceVar-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/ivariable.cr#L3" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/ivariable.cr#L3" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -927,29 +932,29 @@
|
|||
|
||||
def <strong>to_s</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/ivariable.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/ivariable.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>to_s</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/ivariable.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/ivariable.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -666,7 +671,7 @@ is reached.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L5" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L5" target="_blank">
|
||||
ameba/ast/visitors/redundant_control_expression_visitor.cr
|
||||
</a>
|
||||
|
||||
|
@ -688,7 +693,7 @@ is reached.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(rule,source,node)-class-method" class="signature"><strong>.new</strong>(rule, source, node)</a>
|
||||
<a href="#new%28rule%2Csource%2Cnode%29-class-method" class="signature"><strong>.new</strong>(rule, source, node)</a>
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -709,21 +714,21 @@ is reached.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#node:Crystal::ASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
|
||||
<a href="#node%3ACrystal%3A%3AASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
|
||||
|
||||
<div class="summary"><p>A node to run traversal on.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#rule:Rule::Base-instance-method" class="signature"><strong>#rule</strong> : Rule::Base</a>
|
||||
<a href="#rule%3ARule%3A%3ABase-instance-method" class="signature"><strong>#rule</strong> : Rule::Base</a>
|
||||
|
||||
<div class="summary"><p>A corresponding rule that uses this visitor.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#source:Source-instance-method" class="signature"><strong>#source</strong> : Source</a>
|
||||
<a href="#source%3ASource-instance-method" class="signature"><strong>#source</strong> : Source</a>
|
||||
|
||||
<div class="summary"><p>A source that needs to be traversed.</p></div>
|
||||
|
||||
|
@ -774,13 +779,13 @@ is reached.</p>
|
|||
|
||||
def self.<strong>new</strong>(rule, source, node)
|
||||
|
||||
<a class="method-permalink" href="#new(rule,source,node)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28rule%2Csource%2Cnode%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L15" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L15" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -804,7 +809,7 @@ is reached.</p>
|
|||
|
||||
def <strong>node</strong> : Crystal::ASTNode
|
||||
|
||||
<a class="method-permalink" href="#node:Crystal::ASTNode-instance-method">#</a>
|
||||
<a class="method-permalink" href="#node%3ACrystal%3A%3AASTNode-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -815,7 +820,7 @@ is reached.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L13" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L13" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -825,7 +830,7 @@ is reached.</p>
|
|||
|
||||
def <strong>rule</strong> : <a href="../../Ameba/Rule/Base.html">Rule::Base</a>
|
||||
|
||||
<a class="method-permalink" href="#rule:Rule::Base-instance-method">#</a>
|
||||
<a class="method-permalink" href="#rule%3ARule%3A%3ABase-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -836,7 +841,7 @@ is reached.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L7" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L7" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -846,7 +851,7 @@ is reached.</p>
|
|||
|
||||
def <strong>source</strong> : <a href="../../Ameba/Source.html">Source</a>
|
||||
|
||||
<a class="method-permalink" href="#source:Source-instance-method">#</a>
|
||||
<a class="method-permalink" href="#source%3ASource-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -857,7 +862,7 @@ is reached.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L10" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L10" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -666,7 +671,7 @@ the variable from its reference.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/reference.cr#L7" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/reference.cr#L7" target="_blank">
|
||||
ameba/ast/variabling/reference.cr
|
||||
</a>
|
||||
|
||||
|
@ -692,12 +697,12 @@ the variable from its reference.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#explicit=(explicit)-instance-method" class="signature"><strong>#explicit=</strong>(explicit)</a>
|
||||
<a href="#explicit%3D%28explicit%29-instance-method" class="signature"><strong>#explicit=</strong>(explicit)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#explicit?:Bool-instance-method" class="signature"><strong>#explicit?</strong> : Bool</a>
|
||||
<a href="#explicit%3F%3ABool-instance-method" class="signature"><strong>#explicit?</strong> : Bool</a>
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -714,102 +719,102 @@ the variable from its reference.</p>
|
|||
<h3>Instance methods inherited from class <code><a href="../../Ameba/AST/Variable.html">Ameba::AST::Variable</a></code></h3>
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#assign(node,scope)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#assign%28node%2Cscope%29-instance-method" class="tooltip">
|
||||
<span>assign(node, scope)</span>
|
||||
assign</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#assign_before_reference:Crystal::ASTNode?-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#assign_before_reference%3ACrystal%3A%3AASTNode%3F-instance-method" class="tooltip">
|
||||
<span>assign_before_reference : Crystal::ASTNode?</span>
|
||||
assign_before_reference</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#assignments:Array(Ameba::AST::Assignment)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#assignments%3AArray%28Ameba%3A%3AAST%3A%3AAssignment%29-instance-method" class="tooltip">
|
||||
<span>assignments : Array(Ameba::AST::Assignment)</span>
|
||||
assignments</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#captured_by_block?(scope=@scope)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#captured_by_block%3F%28scope%3D%40scope%29-instance-method" class="tooltip">
|
||||
<span>captured_by_block?(scope = @scope)</span>
|
||||
captured_by_block?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#declared_before?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#declared_before%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>declared_before?(node)</span>
|
||||
declared_before?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#end_location(*args,**options)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="tooltip">
|
||||
<span>end_location(*args, **options)<br/>end_location(*args, **options, &)</span>
|
||||
end_location</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#eql?(node)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#eql%3F%28node%29-instance-method" class="tooltip">
|
||||
<span>eql?(node)</span>
|
||||
eql?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#ignored?-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#ignored%3F-instance-method" class="tooltip">
|
||||
<span>ignored?</span>
|
||||
ignored?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#location(*args,**options)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="tooltip">
|
||||
<span>location(*args, **options)<br/>location(*args, **options, &)</span>
|
||||
location</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#name(*args,**options)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#name%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="tooltip">
|
||||
<span>name(*args, **options)<br/>name(*args, **options, &)</span>
|
||||
name</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#node:Crystal::Var-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#node%3ACrystal%3A%3AVar-instance-method" class="tooltip">
|
||||
<span>node : Crystal::Var</span>
|
||||
node</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#reference(node:Crystal::Var,scope:Scope)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#reference%28node%3ACrystal%3A%3AVar%2Cscope%3AScope%29-instance-method" class="tooltip">
|
||||
<span>reference(node : Crystal::Var, scope : Scope)</span>
|
||||
reference</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#reference_assignments!-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#reference_assignments%21-instance-method" class="tooltip">
|
||||
<span>reference_assignments!</span>
|
||||
reference_assignments!</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#referenced?-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#referenced%3F-instance-method" class="tooltip">
|
||||
<span>referenced?</span>
|
||||
referenced?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#references:Array(Ameba::AST::Reference)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#references%3AArray%28Ameba%3A%3AAST%3A%3AReference%29-instance-method" class="tooltip">
|
||||
<span>references : Array(Ameba::AST::Reference)</span>
|
||||
references</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#scope:Scope-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#scope%3AScope-instance-method" class="tooltip">
|
||||
<span>scope : Scope</span>
|
||||
scope</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#special?-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#special%3F-instance-method" class="tooltip">
|
||||
<span>special?</span>
|
||||
special?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#target_of?(assign)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#target_of%3F%28assign%29-instance-method" class="tooltip">
|
||||
<span>target_of?(assign)</span>
|
||||
target_of?</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#to_s(*args,**options)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="tooltip">
|
||||
<span>to_s(*args, **options)<br/>to_s(*args, **options, &)</span>
|
||||
to_s</a>,
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#used_in_macro?(scope=@scope)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#used_in_macro%3F%28scope%3D%40scope%29-instance-method" class="tooltip">
|
||||
<span>used_in_macro?(scope = @scope)</span>
|
||||
used_in_macro?</a>
|
||||
|
||||
|
@ -821,7 +826,7 @@ the variable from its reference.</p>
|
|||
<h3>Constructor methods inherited from class <code><a href="../../Ameba/AST/Variable.html">Ameba::AST::Variable</a></code></h3>
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/Variable.html#new(node,scope)-class-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/Variable.html#new%28node%2Cscope%29-class-method" class="tooltip">
|
||||
<span>new(node, scope)</span>
|
||||
new</a>
|
||||
|
||||
|
@ -873,13 +878,13 @@ the variable from its reference.</p>
|
|||
|
||||
def <strong>explicit=</strong>(explicit)
|
||||
|
||||
<a class="method-permalink" href="#explicit=(explicit)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#explicit%3D%28explicit%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/reference.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/reference.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -889,13 +894,13 @@ the variable from its reference.</p>
|
|||
|
||||
def <strong>explicit?</strong> : Bool
|
||||
|
||||
<a class="method-permalink" href="#explicit?:Bool-instance-method">#</a>
|
||||
<a class="method-permalink" href="#explicit%3F%3ABool-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/reference.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/reference.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -665,7 +670,7 @@ This is where the local variables belong to.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L6" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L6" target="_blank">
|
||||
ameba/ast/scope.cr
|
||||
</a>
|
||||
|
||||
|
@ -687,7 +692,7 @@ This is where the local variables belong to.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(node,outer_scope=nil)-class-method" class="signature"><strong>.new</strong>(node, outer_scope = <span class="n">nil</span>)</a>
|
||||
<a href="#new%28node%2Couter_scope%3Dnil%29-class-method" class="signature"><strong>.new</strong>(node, outer_scope = <span class="n">nil</span>)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new scope.</p></div>
|
||||
|
||||
|
@ -710,198 +715,198 @@ This is where the local variables belong to.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#==(other:self)-instance-method" class="signature"><strong>#==</strong>(other : <span class="k">self</span>)</a>
|
||||
<a href="#%3D%3D%28other%3Aself%29-instance-method" class="signature"><strong>#==</strong>(other : <span class="k">self</span>)</a>
|
||||
|
||||
<div class="summary"><p>Returns <code>true</code> if this reference is the same as <em>other</em>.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#add_argument(node)-instance-method" class="signature"><strong>#add_argument</strong>(node)</a>
|
||||
<a href="#add_argument%28node%29-instance-method" class="signature"><strong>#add_argument</strong>(node)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new argument in the current scope.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#add_ivariable(node)-instance-method" class="signature"><strong>#add_ivariable</strong>(node)</a>
|
||||
<a href="#add_ivariable%28node%29-instance-method" class="signature"><strong>#add_ivariable</strong>(node)</a>
|
||||
|
||||
<div class="summary"><p>Adds a new instance variable to the current scope.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#add_variable(node)-instance-method" class="signature"><strong>#add_variable</strong>(node)</a>
|
||||
<a href="#add_variable%28node%29-instance-method" class="signature"><strong>#add_variable</strong>(node)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new variable in the current scope.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#arg?(var)-instance-method" class="signature"><strong>#arg?</strong>(var)</a>
|
||||
<a href="#arg%3F%28var%29-instance-method" class="signature"><strong>#arg?</strong>(var)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if var is an argument in current scope, false if not.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#arguments:Array(Ameba::AST::Argument)-instance-method" class="signature"><strong>#arguments</strong> : Array(Ameba::AST::Argument)</a>
|
||||
<a href="#arguments%3AArray%28Ameba%3A%3AAST%3A%3AArgument%29-instance-method" class="signature"><strong>#arguments</strong> : Array(Ameba::AST::Argument)</a>
|
||||
|
||||
<div class="summary"><p>Link to the arguments in current scope</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#assign_variable(name,node)-instance-method" class="signature"><strong>#assign_variable</strong>(name, node)</a>
|
||||
<a href="#assign_variable%28name%2Cnode%29-instance-method" class="signature"><strong>#assign_variable</strong>(name, node)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new assignment for the variable.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#assigns_ivar?(name)-instance-method" class="signature"><strong>#assigns_ivar?</strong>(name)</a>
|
||||
<a href="#assigns_ivar%3F%28name%29-instance-method" class="signature"><strong>#assigns_ivar?</strong>(name)</a>
|
||||
|
||||
<div class="summary"><p>Returns true instance variable assinged in this scope.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#block?-instance-method" class="signature"><strong>#block?</strong></a>
|
||||
<a href="#block%3F-instance-method" class="signature"><strong>#block?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if current scope represents a block (or proc), false if not.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#def?-instance-method" class="signature"><strong>#def?</strong></a>
|
||||
<a href="#def%3F-instance-method" class="signature"><strong>#def?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if current scope is a def, false if not.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options,&)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#eql?(node)-instance-method" class="signature"><strong>#eql?</strong>(node)</a>
|
||||
<a href="#eql%3F%28node%29-instance-method" class="signature"><strong>#eql?</strong>(node)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if the <code><a href="../../Ameba/AST/Scope.html#node:Crystal::ASTNode-instance-method">#node</a></code> represents exactly the same Crystal node as <code>@node</code>.</p></div>
|
||||
<div class="summary"><p>Returns true if the <code><a href="../../Ameba/AST/Scope.html#node%3ACrystal%3A%3AASTNode-instance-method">#node</a></code> represents exactly the same Crystal node as <code>@node</code>.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#find_variable(name:String)-instance-method" class="signature"><strong>#find_variable</strong>(name : String)</a>
|
||||
<a href="#find_variable%28name%3AString%29-instance-method" class="signature"><strong>#find_variable</strong>(name : String)</a>
|
||||
|
||||
<div class="summary"><p>Returns variable by its name or nil if it does not exist.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#hash(hasher)-instance-method" class="signature"><strong>#hash</strong>(hasher)</a>
|
||||
<a href="#hash%28hasher%29-instance-method" class="signature"><strong>#hash</strong>(hasher)</a>
|
||||
|
||||
<div class="summary"><p>See <code>Object#hash(hasher)</code></p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#in_macro?-instance-method" class="signature"><strong>#in_macro?</strong></a>
|
||||
<a href="#in_macro%3F-instance-method" class="signature"><strong>#in_macro?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if current scope sits inside a macro.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#inner_scopes:Array(Ameba::AST::Scope)-instance-method" class="signature"><strong>#inner_scopes</strong> : Array(Ameba::AST::Scope)</a>
|
||||
<a href="#inner_scopes%3AArray%28Ameba%3A%3AAST%3A%3AScope%29-instance-method" class="signature"><strong>#inner_scopes</strong> : Array(Ameba::AST::Scope)</a>
|
||||
|
||||
<div class="summary"><p>List of inner scopes</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#ivariables:Array(Ameba::AST::InstanceVariable)-instance-method" class="signature"><strong>#ivariables</strong> : Array(Ameba::AST::InstanceVariable)</a>
|
||||
<a href="#ivariables%3AArray%28Ameba%3A%3AAST%3A%3AInstanceVariable%29-instance-method" class="signature"><strong>#ivariables</strong> : Array(Ameba::AST::InstanceVariable)</a>
|
||||
|
||||
<div class="summary"><p>Link to the instance variables used in current scope</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options,&)-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options)-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#node:Crystal::ASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
|
||||
<a href="#node%3ACrystal%3A%3AASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
|
||||
|
||||
<div class="summary"><p>The actual AST node that represents a current scope.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#outer_scope:Scope?-instance-method" class="signature"><strong>#outer_scope</strong> : Scope?</a>
|
||||
<a href="#outer_scope%3AScope%3F-instance-method" class="signature"><strong>#outer_scope</strong> : Scope?</a>
|
||||
|
||||
<div class="summary"><p>Link to the outer scope</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#references:Array(Ameba::AST::Reference)-instance-method" class="signature"><strong>#references</strong> : Array(Ameba::AST::Reference)</a>
|
||||
<a href="#references%3AArray%28Ameba%3A%3AAST%3A%3AReference%29-instance-method" class="signature"><strong>#references</strong> : Array(Ameba::AST::Reference)</a>
|
||||
|
||||
<div class="summary"><p>Link to all variable references in currency scope</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#references?(variable:Variable,check_inner_scopes=true)-instance-method" class="signature"><strong>#references?</strong>(variable : Variable, check_inner_scopes = <span class="n">true</span>)</a>
|
||||
<a href="#references%3F%28variable%3AVariable%2Ccheck_inner_scopes%3Dtrue%29-instance-method" class="signature"><strong>#references?</strong>(variable : Variable, check_inner_scopes = <span class="n">true</span>)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if current scope (or any of inner scopes) references variable, false if not.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#spawn_block?-instance-method" class="signature"><strong>#spawn_block?</strong></a>
|
||||
<a href="#spawn_block%3F-instance-method" class="signature"><strong>#spawn_block?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if current scope represents a spawn block, e.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options,&)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#top_level?-instance-method" class="signature"><strong>#top_level?</strong></a>
|
||||
<a href="#top_level%3F-instance-method" class="signature"><strong>#top_level?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if this scope is a top level scope, false if not.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#type_definition?-instance-method" class="signature"><strong>#type_definition?</strong></a>
|
||||
<a href="#type_definition%3F-instance-method" class="signature"><strong>#type_definition?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if and only if current scope represents some type definition, for example a class.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#variables:Array(Ameba::AST::Variable)-instance-method" class="signature"><strong>#variables</strong> : Array(Ameba::AST::Variable)</a>
|
||||
<a href="#variables%3AArray%28Ameba%3A%3AAST%3A%3AVariable%29-instance-method" class="signature"><strong>#variables</strong> : Array(Ameba::AST::Variable)</a>
|
||||
|
||||
<div class="summary"><p>Link to local variables</p></div>
|
||||
|
||||
|
@ -952,20 +957,19 @@ This is where the local variables belong to.</p>
|
|||
|
||||
def self.<strong>new</strong>(node, outer_scope = <span class="n">nil</span>)
|
||||
|
||||
<a class="method-permalink" href="#new(node,outer_scope=nil)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28node%2Couter_scope%3Dnil%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L39" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L39" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -989,7 +993,7 @@ This is where the local variables belong to.</p>
|
|||
|
||||
def <strong>==</strong>(other : <span class="k">self</span>)
|
||||
|
||||
<a class="method-permalink" href="#==(other:self)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#%3D%3D%28other%3Aself%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1012,13 +1016,12 @@ This is where the local variables belong to.</p>
|
|||
|
||||
def <strong>add_argument</strong>(node)
|
||||
|
||||
<a class="method-permalink" href="#add_argument(node)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#add_argument%28node%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>)
|
||||
scope.add_argument(arg_node)</code></pre>
|
||||
</div>
|
||||
|
@ -1026,7 +1029,7 @@ scope.add_argument(arg_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L59" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L59" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1036,13 +1039,12 @@ scope.add_argument(arg_node)</code></pre>
|
|||
|
||||
def <strong>add_ivariable</strong>(node)
|
||||
|
||||
<a class="method-permalink" href="#add_ivariable(node)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#add_ivariable%28node%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>)
|
||||
scope.add_ivariable(ivar_node)</code></pre>
|
||||
</div>
|
||||
|
@ -1050,7 +1052,7 @@ scope.add_ivariable(ivar_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L70" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L70" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1060,13 +1062,12 @@ scope.add_ivariable(ivar_node)</code></pre>
|
|||
|
||||
def <strong>add_variable</strong>(node)
|
||||
|
||||
<a class="method-permalink" href="#add_variable(node)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#add_variable%28node%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>)
|
||||
scope.add_variable(var_node)</code></pre>
|
||||
</div>
|
||||
|
@ -1074,7 +1075,7 @@ scope.add_variable(var_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L49" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L49" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1084,7 +1085,7 @@ scope.add_variable(var_node)</code></pre>
|
|||
|
||||
def <strong>arg?</strong>(var)
|
||||
|
||||
<a class="method-permalink" href="#arg?(var)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#arg%3F%28var%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1095,7 +1096,7 @@ scope.add_variable(var_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L155" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L155" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1105,7 +1106,7 @@ scope.add_variable(var_node)</code></pre>
|
|||
|
||||
def <strong>arguments</strong> : Array(<a href="../../Ameba/AST/Argument.html">Ameba::AST::Argument</a>)
|
||||
|
||||
<a class="method-permalink" href="#arguments:Array(Ameba::AST::Argument)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#arguments%3AArray%28Ameba%3A%3AAST%3A%3AArgument%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1116,7 +1117,7 @@ scope.add_variable(var_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L14" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L14" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1126,13 +1127,12 @@ scope.add_variable(var_node)</code></pre>
|
|||
|
||||
def <strong>assign_variable</strong>(name, node)
|
||||
|
||||
<a class="method-permalink" href="#assign_variable(name,node)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#assign_variable%28name%2Cnode%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>)
|
||||
scope.assign_variable(var_name, assign_node)</code></pre>
|
||||
</div>
|
||||
|
@ -1140,7 +1140,7 @@ scope.assign_variable(var_name, assign_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L90" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L90" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1150,7 +1150,7 @@ scope.assign_variable(var_name, assign_node)</code></pre>
|
|||
|
||||
def <strong>assigns_ivar?</strong>(name)
|
||||
|
||||
<a class="method-permalink" href="#assigns_ivar?(name)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#assigns_ivar%3F%28name%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1161,7 +1161,7 @@ scope.assign_variable(var_name, assign_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L119" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L119" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1171,7 +1171,7 @@ scope.assign_variable(var_name, assign_node)</code></pre>
|
|||
|
||||
def <strong>block?</strong>
|
||||
|
||||
<a class="method-permalink" href="#block?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#block%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1183,7 +1183,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L96" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L96" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1193,7 +1193,7 @@ false if not.</p>
|
|||
|
||||
def <strong>def?</strong>
|
||||
|
||||
<a class="method-permalink" href="#def?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#def%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1204,7 +1204,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L145" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L145" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1214,29 +1214,29 @@ false if not.</p>
|
|||
|
||||
def <strong>end_location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>end_location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1246,19 +1246,19 @@ false if not.</p>
|
|||
|
||||
def <strong>eql?</strong>(node)
|
||||
|
||||
<a class="method-permalink" href="#eql?(node)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#eql%3F%28node%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<p>Returns true if the <code><a href="../../Ameba/AST/Scope.html#node:Crystal::ASTNode-instance-method">#node</a></code> represents exactly
|
||||
<p>Returns true if the <code><a href="../../Ameba/AST/Scope.html#node%3ACrystal%3A%3AASTNode-instance-method">#node</a></code> represents exactly
|
||||
the same Crystal node as <code>@node</code>.</p>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L174" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L174" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1268,13 +1268,12 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
|
||||
def <strong>find_variable</strong>(name : String)
|
||||
|
||||
<a class="method-permalink" href="#find_variable(name:String)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#find_variable%28name%3AString%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>)
|
||||
scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
||||
</div>
|
||||
|
@ -1282,7 +1281,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L80" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L80" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1292,7 +1291,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
|
||||
def <strong>hash</strong>(hasher)
|
||||
|
||||
<a class="method-permalink" href="#hash(hasher)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#hash%28hasher%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1315,7 +1314,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
|
||||
def <strong>in_macro?</strong>
|
||||
|
||||
<a class="method-permalink" href="#in_macro?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#in_macro%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1326,7 +1325,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L114" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L114" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1336,7 +1335,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
|
||||
def <strong>inner_scopes</strong> : Array(<a href="../../Ameba/AST/Scope.html">Ameba::AST::Scope</a>)
|
||||
|
||||
<a class="method-permalink" href="#inner_scopes:Array(Ameba::AST::Scope)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#inner_scopes%3AArray%28Ameba%3A%3AAST%3A%3AScope%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1347,7 +1346,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1357,7 +1356,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
|
||||
def <strong>ivariables</strong> : Array(<a href="../../Ameba/AST/InstanceVariable.html">Ameba::AST::InstanceVariable</a>)
|
||||
|
||||
<a class="method-permalink" href="#ivariables:Array(Ameba::AST::InstanceVariable)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#ivariables%3AArray%28Ameba%3A%3AAST%3A%3AInstanceVariable%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1368,23 +1367,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options,&)-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1394,13 +1377,29 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
|
||||
def <strong>location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1410,7 +1409,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
|
||||
def <strong>node</strong> : Crystal::ASTNode
|
||||
|
||||
<a class="method-permalink" href="#node:Crystal::ASTNode-instance-method">#</a>
|
||||
<a class="method-permalink" href="#node%3ACrystal%3A%3AASTNode-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1421,7 +1420,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L26" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L26" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1431,7 +1430,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
|
||||
def <strong>outer_scope</strong> : <a href="../../Ameba/AST/Scope.html">Scope</a>?
|
||||
|
||||
<a class="method-permalink" href="#outer_scope:Scope?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#outer_scope%3AScope%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1442,7 +1441,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1452,7 +1451,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
|
||||
def <strong>references</strong> : Array(<a href="../../Ameba/AST/Reference.html">Ameba::AST::Reference</a>)
|
||||
|
||||
<a class="method-permalink" href="#references:Array(Ameba::AST::Reference)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#references%3AArray%28Ameba%3A%3AAST%3A%3AReference%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1463,7 +1462,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L11" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L11" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1473,7 +1472,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
|
||||
def <strong>references?</strong>(variable : <a href="../../Ameba/AST/Variable.html">Variable</a>, check_inner_scopes = <span class="n">true</span>)
|
||||
|
||||
<a class="method-permalink" href="#references?(variable:Variable,check_inner_scopes=true)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#references%3F%28variable%3AVariable%2Ccheck_inner_scopes%3Dtrue%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1485,7 +1484,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L137" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L137" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1495,13 +1494,12 @@ false if not.</p>
|
|||
|
||||
def <strong>spawn_block?</strong>
|
||||
|
||||
<a class="method-permalink" href="#spawn_block?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#spawn_block%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<p>Returns true if current scope represents a spawn block, e. g.</p>
|
||||
|
||||
<pre><code class="language-crystal">spawn <span class="k">do</span>
|
||||
<span class="c"># ...</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
@ -1510,7 +1508,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L107" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L107" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1520,29 +1518,29 @@ false if not.</p>
|
|||
|
||||
def <strong>to_s</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>to_s</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1552,7 +1550,7 @@ false if not.</p>
|
|||
|
||||
def <strong>top_level?</strong>
|
||||
|
||||
<a class="method-permalink" href="#top_level?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#top_level%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1563,7 +1561,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L150" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L150" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1573,7 +1571,7 @@ false if not.</p>
|
|||
|
||||
def <strong>type_definition?</strong>
|
||||
|
||||
<a class="method-permalink" href="#type_definition?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#type_definition%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1585,7 +1583,7 @@ type definition, for example a class.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L126" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L126" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1595,7 +1593,7 @@ type definition, for example a class.</p>
|
|||
|
||||
def <strong>variables</strong> : Array(<a href="../../Ameba/AST/Variable.html">Ameba::AST::Variable</a>)
|
||||
|
||||
<a class="method-permalink" href="#variables:Array(Ameba::AST::Variable)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#variables%3AArray%28Ameba%3A%3AAST%3A%3AVariable%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1606,7 +1604,7 @@ type definition, for example a class.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -664,7 +669,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/scope_visitor.cr#L5" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/scope_visitor.cr#L5" target="_blank">
|
||||
ameba/ast/visitors/scope_visitor.cr
|
||||
</a>
|
||||
|
||||
|
@ -710,7 +715,7 @@
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(rule,source)-class-method" class="signature"><strong>.new</strong>(rule, source)</a>
|
||||
<a href="#new%28rule%2Csource%29-class-method" class="signature"><strong>.new</strong>(rule, source)</a>
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -731,7 +736,7 @@
|
|||
<h3>Instance methods inherited from class <code><a href="../../Ameba/AST/BaseVisitor.html">Ameba::AST::BaseVisitor</a></code></h3>
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/BaseVisitor.html#visit(node:Crystal::ASTNode)-instance-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/BaseVisitor.html#visit%28node%3ACrystal%3A%3AASTNode%29-instance-method" class="tooltip">
|
||||
<span>visit(node : Crystal::ASTNode)</span>
|
||||
visit</a>
|
||||
|
||||
|
@ -743,7 +748,7 @@
|
|||
<h3>Constructor methods inherited from class <code><a href="../../Ameba/AST/BaseVisitor.html">Ameba::AST::BaseVisitor</a></code></h3>
|
||||
|
||||
|
||||
<a href="../../Ameba/AST/BaseVisitor.html#new(rule,source)-class-method" class="tooltip">
|
||||
<a href="../../Ameba/AST/BaseVisitor.html#new%28rule%2Csource%29-class-method" class="tooltip">
|
||||
<span>new(rule, source)</span>
|
||||
new</a>
|
||||
|
||||
|
@ -801,13 +806,13 @@
|
|||
|
||||
def self.<strong>new</strong>(rule, source)
|
||||
|
||||
<a class="method-permalink" href="#new(rule,source)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28rule%2Csource%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/scope_visitor.cr#L12" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/scope_visitor.cr#L12" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -665,7 +670,7 @@ can characterize the source (i.e. require statements, modules etc.)</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/top_level_nodes_visitor.cr#L4" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/top_level_nodes_visitor.cr#L4" target="_blank">
|
||||
ameba/ast/visitors/top_level_nodes_visitor.cr
|
||||
</a>
|
||||
|
||||
|
@ -687,7 +692,7 @@ can characterize the source (i.e. require statements, modules etc.)</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(scope:Crystal::ASTNode)-class-method" class="signature"><strong>.new</strong>(scope : Crystal::ASTNode)</a>
|
||||
<a href="#new%28scope%3ACrystal%3A%3AASTNode%29-class-method" class="signature"><strong>.new</strong>(scope : Crystal::ASTNode)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new instance of visitor</p></div>
|
||||
|
||||
|
@ -710,19 +715,19 @@ can characterize the source (i.e. require statements, modules etc.)</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#require_nodes:Array(Crystal::Require)-instance-method" class="signature"><strong>#require_nodes</strong> : Array(Crystal::Require)</a>
|
||||
<a href="#require_nodes%3AArray%28Crystal%3A%3ARequire%29-instance-method" class="signature"><strong>#require_nodes</strong> : Array(Crystal::Require)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#visit(node:Crystal::Expressions)-instance-method" class="signature"><strong>#visit</strong>(node : Crystal::Expressions)</a>
|
||||
<a href="#visit%28node%3ACrystal%3A%3AExpressions%29-instance-method" class="signature"><strong>#visit</strong>(node : Crystal::Expressions)</a>
|
||||
|
||||
<div class="summary"><p>If a top level node is Crystal::Expressions traverse the children.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#visit(node:Crystal::ASTNode)-instance-method" class="signature"><strong>#visit</strong>(node : Crystal::ASTNode)</a>
|
||||
<a href="#visit%28node%3ACrystal%3A%3AASTNode%29-instance-method" class="signature"><strong>#visit</strong>(node : Crystal::ASTNode)</a>
|
||||
|
||||
<div class="summary"><p>A general visit method for rest of the nodes.</p></div>
|
||||
|
||||
|
@ -783,7 +788,7 @@ can characterize the source (i.e. require statements, modules etc.)</p>
|
|||
|
||||
def self.<strong>new</strong>(scope : Crystal::ASTNode)
|
||||
|
||||
<a class="method-permalink" href="#new(scope:Crystal::ASTNode)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28scope%3ACrystal%3A%3AASTNode%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -794,7 +799,7 @@ can characterize the source (i.e. require statements, modules etc.)</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/top_level_nodes_visitor.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/top_level_nodes_visitor.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -818,13 +823,13 @@ can characterize the source (i.e. require statements, modules etc.)</p>
|
|||
|
||||
def <strong>require_nodes</strong> : Array(Crystal::Require)
|
||||
|
||||
<a class="method-permalink" href="#require_nodes:Array(Crystal::Require)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#require_nodes%3AArray%28Crystal%3A%3ARequire%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/top_level_nodes_visitor.cr#L5" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/top_level_nodes_visitor.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -834,7 +839,7 @@ can characterize the source (i.e. require statements, modules etc.)</p>
|
|||
|
||||
def <strong>visit</strong>(node : Crystal::Expressions)
|
||||
|
||||
<a class="method-permalink" href="#visit(node:Crystal::Expressions)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#visit%28node%3ACrystal%3A%3AExpressions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -845,7 +850,7 @@ can characterize the source (i.e. require statements, modules etc.)</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/top_level_nodes_visitor.cr#L18" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/top_level_nodes_visitor.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -855,7 +860,7 @@ can characterize the source (i.e. require statements, modules etc.)</p>
|
|||
|
||||
def <strong>visit</strong>(node : Crystal::ASTNode)
|
||||
|
||||
<a class="method-permalink" href="#visit(node:Crystal::ASTNode)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#visit%28node%3ACrystal%3A%3AASTNode%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -867,7 +872,7 @@ Returns false meaning all child nodes will not be traversed.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/visitors/top_level_nodes_visitor.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/visitors/top_level_nodes_visitor.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -665,6 +670,8 @@
|
|||
|
||||
<li class="other-type"><a href="../../Ameba/AST/FlowExpressionVisitor.html">Ameba::AST::FlowExpressionVisitor</a></li>
|
||||
|
||||
<li class="other-type"><a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">Ameba::Rule::Lint::AmbiguousAssignment</a></li>
|
||||
|
||||
<li class="other-type"><a href="../../Ameba/Rule/Lint/EmptyExpression.html">Ameba::Rule::Lint::EmptyExpression</a></li>
|
||||
|
||||
<li class="other-type"><a href="../../Ameba/Rule/Lint/EmptyLoop.html">Ameba::Rule::Lint::EmptyLoop</a></li>
|
||||
|
@ -694,7 +701,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/util.cr#L2" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/util.cr#L2" target="_blank">
|
||||
ameba/ast/util.cr
|
||||
</a>
|
||||
|
||||
|
@ -720,61 +727,68 @@
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#abort?(node)-instance-method" class="signature"><strong>#abort?</strong>(node)</a>
|
||||
<a href="#abort%3F%28node%29-instance-method" class="signature"><strong>#abort?</strong>(node)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if node represents <code>abort</code> method call.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#exit?(node)-instance-method" class="signature"><strong>#exit?</strong>(node)</a>
|
||||
<a href="#exit%3F%28node%29-instance-method" class="signature"><strong>#exit?</strong>(node)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if node represents <code>exit</code> method call.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#flow_command?(node,in_loop)-instance-method" class="signature"><strong>#flow_command?</strong>(node, in_loop)</a>
|
||||
<a href="#flow_command%3F%28node%2Cin_loop%29-instance-method" class="signature"><strong>#flow_command?</strong>(node, in_loop)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if node is a flow command, false - otherwise.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#flow_expression?(node,in_loop=false)-instance-method" class="signature"><strong>#flow_expression?</strong>(node, in_loop = <span class="n">false</span>)</a>
|
||||
<a href="#flow_expression%3F%28node%2Cin_loop%3Dfalse%29-instance-method" class="signature"><strong>#flow_expression?</strong>(node, in_loop = <span class="n">false</span>)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if node is a flow expression, false if not.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#literal?(node)-instance-method" class="signature"><strong>#literal?</strong>(node)</a>
|
||||
<a href="#literal%3F%28node%29-instance-method" class="signature"><strong>#literal?</strong>(node)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if current <code>node</code> is a literal, false otherwise.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#loop?(node)-instance-method" class="signature"><strong>#loop?</strong>(node)</a>
|
||||
<a href="#loop%3F%28node%29-instance-method" class="signature"><strong>#loop?</strong>(node)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if node represents a loop.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#node_source(node,code_lines)-instance-method" class="signature"><strong>#node_source</strong>(node, code_lines)</a>
|
||||
<a href="#node_source%28node%2Ccode_lines%29-instance-method" class="signature"><strong>#node_source</strong>(node, code_lines)</a>
|
||||
|
||||
<div class="summary"><p>Returns a source code for the current node.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#raise?(node)-instance-method" class="signature"><strong>#raise?</strong>(node)</a>
|
||||
<a href="#raise%3F%28node%29-instance-method" class="signature"><strong>#raise?</strong>(node)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if node represents <code>raise</code> method call.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#source_between%28loc%2Cend_loc%2Ccode_lines%29%3AString%3F-instance-method" class="signature"><strong>#source_between</strong>(loc, end_loc, code_lines) : String?</a>
|
||||
|
||||
<div class="summary"><p>Returns the source code from <em>loc</em> to <em>end_loc</em> (inclusive).</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -804,7 +818,7 @@
|
|||
|
||||
def <strong>abort?</strong>(node)
|
||||
|
||||
<a class="method-permalink" href="#abort?(node)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#abort%3F%28node%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -815,7 +829,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/util.cr#L140" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/util.cr#L145" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -825,7 +839,7 @@
|
|||
|
||||
def <strong>exit?</strong>(node)
|
||||
|
||||
<a class="method-permalink" href="#exit?(node)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#exit%3F%28node%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -836,7 +850,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/util.cr#L134" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/util.cr#L139" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -846,7 +860,7 @@
|
|||
|
||||
def <strong>flow_command?</strong>(node, in_loop)
|
||||
|
||||
<a class="method-permalink" href="#flow_command?(node,in_loop)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#flow_command%3F%28node%2Cin_loop%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -859,7 +873,7 @@ or special call node that interrupts execution (i.e. raise, exit, abort).</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/util.cr#L62" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/util.cr#L67" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -869,17 +883,15 @@ or special call node that interrupts execution (i.e. raise, exit, abort).</p>
|
|||
|
||||
def <strong>flow_expression?</strong>(node, in_loop = <span class="n">false</span>)
|
||||
|
||||
<a class="method-permalink" href="#flow_expression?(node,in_loop=false)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#flow_expression%3F%28node%2Cin_loop%3Dfalse%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<p>Returns true if node is a flow expression, false if not.
|
||||
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>
|
||||
<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>
|
||||
|
@ -887,20 +899,17 @@ a flow command <code>return</code>:</p>
|
|||
<span class="k">else</span>
|
||||
<span class="k">return</span> <span class="n">:zero</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<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>
|
||||
<span class="k">return</span> <span class="n">:positive</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>That's because not all branches return(i.e. <code>else</code> is missing).</p>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/util.cr#L100" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/util.cr#L105" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -910,7 +919,7 @@ a flow command <code>return</code>:</p>
|
|||
|
||||
def <strong>literal?</strong>(node)
|
||||
|
||||
<a class="method-permalink" href="#literal?(node)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#literal%3F%28node%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -921,7 +930,7 @@ a flow command <code>return</code>:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/util.cr#L4" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/util.cr#L4" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -931,7 +940,7 @@ a flow command <code>return</code>:</p>
|
|||
|
||||
def <strong>loop?</strong>(node)
|
||||
|
||||
<a class="method-permalink" href="#loop?(node)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#loop%3F%28node%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -942,7 +951,7 @@ a flow command <code>return</code>:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/util.cr#L146" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/util.cr#L151" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -952,7 +961,7 @@ a flow command <code>return</code>:</p>
|
|||
|
||||
def <strong>node_source</strong>(node, code_lines)
|
||||
|
||||
<a class="method-permalink" href="#node_source(node,code_lines)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#node_source%28node%2Ccode_lines%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -965,7 +974,7 @@ to determine and cut a piece of source of the node.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/util.cr#L33" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/util.cr#L33" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -975,7 +984,7 @@ to determine and cut a piece of source of the node.</p>
|
|||
|
||||
def <strong>raise?</strong>(node)
|
||||
|
||||
<a class="method-permalink" href="#raise?(node)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#raise%3F%28node%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -986,7 +995,28 @@ to determine and cut a piece of source of the node.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/util.cr#L128" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/util.cr#L133" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="source_between(loc,end_loc,code_lines):String?-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>source_between</strong>(loc, end_loc, code_lines) : String?
|
||||
|
||||
<a class="method-permalink" href="#source_between%28loc%2Cend_loc%2Ccode_lines%29%3AString%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<p>Returns the source code from <em>loc</em> to <em>end_loc</em> (inclusive).</p>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/util.cr#L42" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -679,7 +684,7 @@ Holds the var node and variable assigments.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L4" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L4" target="_blank">
|
||||
ameba/ast/variabling/variable.cr
|
||||
</a>
|
||||
|
||||
|
@ -701,7 +706,7 @@ Holds the var node and variable assigments.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(node,scope)-class-method" class="signature"><strong>.new</strong>(node, scope)</a>
|
||||
<a href="#new%28node%2Cscope%29-class-method" class="signature"><strong>.new</strong>(node, scope)</a>
|
||||
|
||||
<div class="summary"><p>Creates a new variable(in the scope).</p></div>
|
||||
|
||||
|
@ -724,152 +729,152 @@ Holds the var node and variable assigments.</p>
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#assign(node,scope)-instance-method" class="signature"><strong>#assign</strong>(node, scope)</a>
|
||||
<a href="#assign%28node%2Cscope%29-instance-method" class="signature"><strong>#assign</strong>(node, scope)</a>
|
||||
|
||||
<div class="summary"><p>Assigns the variable (creates a new assignment).</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#assign_before_reference:Crystal::ASTNode?-instance-method" class="signature"><strong>#assign_before_reference</strong> : Crystal::ASTNode?</a>
|
||||
<a href="#assign_before_reference%3ACrystal%3A%3AASTNode%3F-instance-method" class="signature"><strong>#assign_before_reference</strong> : Crystal::ASTNode?</a>
|
||||
|
||||
<div class="summary"><p>Node of the first assignment which can be available before any reference.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#assignments:Array(Ameba::AST::Assignment)-instance-method" class="signature"><strong>#assignments</strong> : Array(Ameba::AST::Assignment)</a>
|
||||
<a href="#assignments%3AArray%28Ameba%3A%3AAST%3A%3AAssignment%29-instance-method" class="signature"><strong>#assignments</strong> : Array(Ameba::AST::Assignment)</a>
|
||||
|
||||
<div class="summary"><p>List of the assigments of this variable.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#captured_by_block?(scope=@scope)-instance-method" class="signature"><strong>#captured_by_block?</strong>(scope = @scope)</a>
|
||||
<a href="#captured_by_block%3F%28scope%3D%40scope%29-instance-method" class="signature"><strong>#captured_by_block?</strong>(scope = @scope)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if the current var is referenced in in the block.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#declared_before?(node)-instance-method" class="signature"><strong>#declared_before?</strong>(node)</a>
|
||||
<a href="#declared_before%3F%28node%29-instance-method" class="signature"><strong>#declared_before?</strong>(node)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if the variable is declared before the <code><a href="../../Ameba/AST/Variable.html#node:Crystal::Var-instance-method">#node</a></code>.</p></div>
|
||||
<div class="summary"><p>Returns true if the variable is declared before the <code><a href="../../Ameba/AST/Variable.html#node%3ACrystal%3A%3AVar-instance-method">#node</a></code>.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#end_location(*args,**options,&)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#eql?(node)-instance-method" class="signature"><strong>#eql?</strong>(node)</a>
|
||||
<a href="#eql%3F%28node%29-instance-method" class="signature"><strong>#eql?</strong>(node)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if the <code><a href="../../Ameba/AST/Variable.html#node:Crystal::Var-instance-method">#node</a></code> represents exactly the same Crystal node as <code>@node</code>.</p></div>
|
||||
<div class="summary"><p>Returns true if the <code><a href="../../Ameba/AST/Variable.html#node%3ACrystal%3A%3AVar-instance-method">#node</a></code> represents exactly the same Crystal node as <code>@node</code>.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#ignored?-instance-method" class="signature"><strong>#ignored?</strong></a>
|
||||
<a href="#ignored%3F-instance-method" class="signature"><strong>#ignored?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if the name starts with '_', false if not.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options)-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#location(*args,**options,&)-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
<a href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#name(*args,**options)-instance-method" class="signature"><strong>#name</strong>(*args, **options)</a>
|
||||
<a href="#name%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#name</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#name(*args,**options,&)-instance-method" class="signature"><strong>#name</strong>(*args, **options, &)</a>
|
||||
<a href="#name%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#name</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#node:Crystal::Var-instance-method" class="signature"><strong>#node</strong> : Crystal::Var</a>
|
||||
<a href="#node%3ACrystal%3A%3AVar-instance-method" class="signature"><strong>#node</strong> : Crystal::Var</a>
|
||||
|
||||
<div class="summary"><p>The actual var node.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#reference(node:Crystal::Var,scope:Scope)-instance-method" class="signature"><strong>#reference</strong>(node : Crystal::Var, scope : Scope)</a>
|
||||
<a href="#reference%28node%3ACrystal%3A%3AVar%2Cscope%3AScope%29-instance-method" class="signature"><strong>#reference</strong>(node : Crystal::Var, scope : Scope)</a>
|
||||
|
||||
<div class="summary"><p>Creates a reference to this variable in some scope.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#reference_assignments!-instance-method" class="signature"><strong>#reference_assignments!</strong></a>
|
||||
<a href="#reference_assignments%21-instance-method" class="signature"><strong>#reference_assignments!</strong></a>
|
||||
|
||||
<div class="summary"><p>Reference variable's assignments.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#referenced?-instance-method" class="signature"><strong>#referenced?</strong></a>
|
||||
<a href="#referenced%3F-instance-method" class="signature"><strong>#referenced?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if variable has any reference.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#references:Array(Ameba::AST::Reference)-instance-method" class="signature"><strong>#references</strong> : Array(Ameba::AST::Reference)</a>
|
||||
<a href="#references%3AArray%28Ameba%3A%3AAST%3A%3AReference%29-instance-method" class="signature"><strong>#references</strong> : Array(Ameba::AST::Reference)</a>
|
||||
|
||||
<div class="summary"><p>List of the references of this variable.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#scope:Scope-instance-method" class="signature"><strong>#scope</strong> : Scope</a>
|
||||
<a href="#scope%3AScope-instance-method" class="signature"><strong>#scope</strong> : Scope</a>
|
||||
|
||||
<div class="summary"><p>Scope of this variable.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#special?-instance-method" class="signature"><strong>#special?</strong></a>
|
||||
<a href="#special%3F-instance-method" class="signature"><strong>#special?</strong></a>
|
||||
|
||||
<div class="summary"><p>Returns true if it is a special variable, i.e <code>$?</code>.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#target_of?(assign)-instance-method" class="signature"><strong>#target_of?</strong>(assign)</a>
|
||||
<a href="#target_of%3F%28assign%29-instance-method" class="signature"><strong>#target_of?</strong>(assign)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if the variable is a target (on the left) of the assignment, false otherwise.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#to_s(*args,**options,&)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#used_in_macro?(scope=@scope)-instance-method" class="signature"><strong>#used_in_macro?</strong>(scope = @scope)</a>
|
||||
<a href="#used_in_macro%3F%28scope%3D%40scope%29-instance-method" class="signature"><strong>#used_in_macro?</strong>(scope = @scope)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if current variable potentially referenced in a macro, false if not.</p></div>
|
||||
|
||||
|
@ -920,20 +925,19 @@ Holds the var node and variable assigments.</p>
|
|||
|
||||
def self.<strong>new</strong>(node, scope)
|
||||
|
||||
<a class="method-permalink" href="#new(node,scope)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28node%2Cscope%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -957,14 +961,13 @@ Holds the var node and variable assigments.</p>
|
|||
|
||||
def <strong>assign</strong>(node, scope)
|
||||
|
||||
<a class="method-permalink" href="#assign(node,scope)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#assign%28node%2Cscope%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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)
|
||||
variable.assign(node1)
|
||||
variable.assign(node2)
|
||||
|
@ -974,7 +977,7 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -984,7 +987,7 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
|
||||
def <strong>assign_before_reference</strong> : Crystal::ASTNode?
|
||||
|
||||
<a class="method-permalink" href="#assign_before_reference:Crystal::ASTNode?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#assign_before_reference%3ACrystal%3A%3AASTNode%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -995,7 +998,7 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L18" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1005,7 +1008,7 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
|
||||
def <strong>assignments</strong> : Array(<a href="../../Ameba/AST/Assignment.html">Ameba::AST::Assignment</a>)
|
||||
|
||||
<a class="method-permalink" href="#assignments:Array(Ameba::AST::Assignment)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#assignments%3AArray%28Ameba%3A%3AAST%3A%3AAssignment%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1016,7 +1019,7 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L6" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L6" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1026,7 +1029,7 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
|
||||
def <strong>captured_by_block?</strong>(scope = @scope)
|
||||
|
||||
<a class="method-permalink" href="#captured_by_block?(scope=@scope)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#captured_by_block%3F%28scope%3D%40scope%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1034,12 +1037,9 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
<p>Returns true if the current var is referenced in
|
||||
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>
|
||||
<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>
|
||||
<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>
|
||||
|
@ -1047,7 +1047,7 @@ by block:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L111" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L111" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1057,18 +1057,18 @@ by block:</p>
|
|||
|
||||
def <strong>declared_before?</strong>(node)
|
||||
|
||||
<a class="method-permalink" href="#declared_before?(node)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#declared_before%3F%28node%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<p>Returns true if the variable is declared before the <code><a href="../../Ameba/AST/Variable.html#node:Crystal::Var-instance-method">#node</a></code>.</p>
|
||||
<p>Returns true if the variable is declared before the <code><a href="../../Ameba/AST/Variable.html#node%3ACrystal%3A%3AVar-instance-method">#node</a></code>.</p>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L158" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L158" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1078,29 +1078,29 @@ by block:</p>
|
|||
|
||||
def <strong>end_location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L21" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L21" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>end_location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#end_location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L21" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L21" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1110,19 +1110,19 @@ by block:</p>
|
|||
|
||||
def <strong>eql?</strong>(node)
|
||||
|
||||
<a class="method-permalink" href="#eql?(node)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#eql%3F%28node%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<p>Returns true if the <code><a href="../../Ameba/AST/Variable.html#node:Crystal::Var-instance-method">#node</a></code> represents exactly
|
||||
<p>Returns true if the <code><a href="../../Ameba/AST/Variable.html#node%3ACrystal%3A%3AVar-instance-method">#node</a></code> represents exactly
|
||||
the same Crystal node as <code>@node</code>.</p>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L151" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L151" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1132,7 +1132,7 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
|
||||
def <strong>ignored?</strong>
|
||||
|
||||
<a class="method-permalink" href="#ignored?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#ignored%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1143,7 +1143,7 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L145" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L145" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1153,29 +1153,29 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
|
||||
def <strong>location</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>location</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#location(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1185,29 +1185,29 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
|
||||
def <strong>name</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#name(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#name%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="name(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="name(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>name</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#name(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#name%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1217,7 +1217,7 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
|
||||
def <strong>node</strong> : Crystal::Var
|
||||
|
||||
<a class="method-permalink" href="#node:Crystal::Var-instance-method">#</a>
|
||||
<a class="method-permalink" href="#node%3ACrystal%3A%3AVar-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1228,7 +1228,7 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L12" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L12" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1238,13 +1238,12 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
|
||||
def <strong>reference</strong>(node : Crystal::Var, scope : <a href="../../Ameba/AST/Scope.html">Scope</a>)
|
||||
|
||||
<a class="method-permalink" href="#reference(node:Crystal::Var,scope:Scope)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#reference%28node%3ACrystal%3A%3AVar%2Cscope%3AScope%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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)
|
||||
variable.reference(var_node, some_scope)</code></pre>
|
||||
</div>
|
||||
|
@ -1252,7 +1251,7 @@ variable.reference(var_node, some_scope)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L70" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L70" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1262,13 +1261,12 @@ variable.reference(var_node, some_scope)</code></pre>
|
|||
|
||||
def <strong>reference_assignments!</strong>
|
||||
|
||||
<a class="method-permalink" href="#reference_assignments!-instance-method">#</a>
|
||||
<a class="method-permalink" href="#reference_assignments%21-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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)
|
||||
variable.assign(assign_node)
|
||||
variable.reference_assignments!</code></pre>
|
||||
|
@ -1277,7 +1275,7 @@ variable.reference_assignments!</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L84" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L84" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1287,13 +1285,12 @@ variable.reference_assignments!</code></pre>
|
|||
|
||||
def <strong>referenced?</strong>
|
||||
|
||||
<a class="method-permalink" href="#referenced?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#referenced%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<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)
|
||||
variable.reference(var_node)
|
||||
variable.referenced? <span class="c"># => true</span></code></pre>
|
||||
|
@ -1302,7 +1299,7 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L60" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L60" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1312,7 +1309,7 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
|
||||
def <strong>references</strong> : Array(<a href="../../Ameba/AST/Reference.html">Ameba::AST::Reference</a>)
|
||||
|
||||
<a class="method-permalink" href="#references:Array(Ameba::AST::Reference)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#references%3AArray%28Ameba%3A%3AAST%3A%3AReference%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1323,7 +1320,7 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L9" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L9" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1333,7 +1330,7 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
|
||||
def <strong>scope</strong> : <a href="../../Ameba/AST/Scope.html">Scope</a>
|
||||
|
||||
<a class="method-permalink" href="#scope:Scope-instance-method">#</a>
|
||||
<a class="method-permalink" href="#scope%3AScope-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1344,7 +1341,7 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L15" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L15" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1354,7 +1351,7 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
|
||||
def <strong>special?</strong>
|
||||
|
||||
<a class="method-permalink" href="#special?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#special%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1365,7 +1362,7 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L34" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L34" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1375,7 +1372,7 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
|
||||
def <strong>target_of?</strong>(assign)
|
||||
|
||||
<a class="method-permalink" href="#target_of?(assign)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#target_of%3F%28assign%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1387,7 +1384,7 @@ false otherwise.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L133" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L133" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1397,29 +1394,29 @@ false otherwise.</p>
|
|||
|
||||
def <strong>to_s</strong>(*args, **options)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>to_s</strong>(*args, **options, &)
|
||||
|
||||
<a class="method-permalink" href="#to_s(*args,**options,&)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1429,7 +1426,7 @@ false otherwise.</p>
|
|||
|
||||
def <strong>used_in_macro?</strong>(scope = @scope)
|
||||
|
||||
<a class="method-permalink" href="#used_in_macro?(scope=@scope)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#used_in_macro%3F%28scope%3D%40scope%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
@ -1441,7 +1438,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/variabling/variable.cr#L122" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/variabling/variable.cr#L122" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue