class Ameba::AST::CountingVisitor

Overview

AST Visitor that counts occurrences of certain keywords

Defined in:

ameba/ast/visitors/counting_visitor.cr

Constant Summary

DEFAULT_COMPLEXITY = 1

Constructors

Instance Method Summary

Constructor Detail

def self.new(scope : Crystal::ASTNode) #

Creates a new counting visitor


[View source]

Instance Method Detail

def count #

Returns the number of keywords that were found in the node


[View source]
def macro_condition? : Bool #

[View source]
def visit(node : Crystal::MacroIf | Crystal::MacroFor) #

[View source]