class

Ameba::AST::CountingVisitor

Inherits Crystal::Visitor < Reference < Object

AST Visitor that counts occurrences of certain keywords

Constants

DEFAULT_COMPLEXITY = 1

Constructors

new(node : Crystal::ASTNode)

Creates a new counting visitor

Source

Instance methods

count

Returns the number of keywords that were found in the node

Source
macro_condition?

Returns true if the node is within a macro condition

Source
visit(node : Crystal::MacroIf | Crystal::MacroFor)
Source