shard-ameba/spec/ameba/ast
V. Elenhaupt 6475c2bb25
Variable scope & useless assignments (#41)
* AST::Visitor -> AST::NodeVisitor

* Scope & ScopeVisitor

* Useless assignment rule

* Instance vars and useless assignments

* Multiple assigns one by one

* Support outer scope

* Variable used in the useless assignment

* Support OpAssign & MultiAssign

* Captured by block

* Variable, Assignment, Reference & Refactoring

* Variable has references, Assignment can be referenced

* Branch entity

* Handle useless assignments in branches

* Handle assignments in a loop

* Handle branch equality

* Handle special var `$?` assignment

* Improve captured by block stuff

* Avoid assignments in property definitions

(UselessAssign rule reports an warning)

* Support MacroIf and MacroFor branches

* Handle assignments with shadowed vars in inner scopes

* Add method arguments as scope variables

* Handle case if branch is blank

* Top level scope

* Handle case when branch is nop?
2018-05-03 18:57:47 +03:00
..
variabling Variable scope & useless assignments (#41) 2018-05-03 18:57:47 +03:00
visitors Variable scope & useless assignments (#41) 2018-05-03 18:57:47 +03:00
branch_spec.cr Variable scope & useless assignments (#41) 2018-05-03 18:57:47 +03:00
branchable_spec.cr Variable scope & useless assignments (#41) 2018-05-03 18:57:47 +03:00
scope_spec.cr Variable scope & useless assignments (#41) 2018-05-03 18:57:47 +03:00
util_spec.cr AST node source code 2017-11-07 13:28:33 +02:00