class Ameba::AST::CountingVisitor

Overview

AST Visitor that counts occurrences of certain keywords

Defined in:

Constant Summary

DEFAULT_COMPLEXITY = 1

Constructors

Instance Method Summary

Constructor Detail

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

Creates a new counting visitor


Instance Method Detail

def count #

Returns the number of keywords that were found in the node


def macro_condition : Bool #

def visit(node : Crystal::MacroIf | Crystal::MacroFor) #