Ameba::AST::NodeVisitor
Inherits Ameba::AST::BaseVisitor < Crystal::Visitor < Reference < Object
An AST Visitor that traverses the source and allows all nodes to be inspected by rules.
visitor = Ameba::AST::NodeVisitor.new(rule, source)
Constants
List of nodes to be visited by Ameba's rules.
Constructors
Class methods
Instance methods
A visit callback for Crystal::Alias node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::ArrayLiteral node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::Assign node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::Block node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::Call node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::Case node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::ClassDef node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::ClassVar node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::ControlExpression node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::Def node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::EnumDef node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::ExceptionHandler node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::Expressions node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::HashLiteral node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::If node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::InstanceVar node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::IsA node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::LibDef node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::MacroExpression node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::ModuleDef node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::MultiAssign node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::NilLiteral node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::ProcLiteral node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::Rescue node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::Select node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::StringInterpolation node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::StringLiteral node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::Union node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::Unless node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::Until node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::Var node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::When node.
Returns true if the child nodes should be traversed as well,
false otherwise.
A visit callback for Crystal::While node.
Returns true if the child nodes should be traversed as well,
false otherwise.