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(node : Crystal::ASTNode) #

Creates a new counting visitor


[View source]

Instance Method Detail

def count : Int32 #

Returns the number of keywords that were found in the node


[View source]
def macro_condition? : Bool #

Returns true if the node is within a macro condition


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

[View source]