Ameba::AST::BaseVisitor - ameba 1.7.0

# abstract class Ameba::AST::BaseVisitor

- Ameba::AST::BaseVisitor
- Crystal::Visitor
- Reference
- Object

##
Overview

An abstract base visitor that utilizes general logic for all visitors.

##
Direct Known Subclasses

- Ameba::AST::FlowExpressionVisitor
- Ameba::AST::ImplicitReturnVisitor
- Ameba::AST::NodeVisitor
- Ameba::AST::ScopeVisitor

##
Defined in:

ameba/ast/visitors/base_visitor.cr

##
Constructors

- .new(rule : Ameba::Rule::Base, source : Ameba::Source)

  Creates instance of this visitor.

##
Instance Method Summary

- #visit(node : Crystal::ASTNode)

  A main visit method that accepts `Crystal::ASTNode`.

##
Constructor Detail

def self.new(rule : Ameba::Rule::Base, source : Ameba::Source) #

Creates instance of this visitor.

    visitor = Ameba::AST::NodeVisitor.new(rule, source)

##
Instance Method Detail

def visit(node : Crystal::ASTNode) #

A main visit method that accepts `Crystal::ASTNode`. Returns `true`, meaning all child nodes will be traversed.