class Ameba::AST::ScopeVisitor

Overview

AST Visitor that traverses the source and constructs scopes.

Defined in:

ameba/ast/visitors/scope_visitor.cr

Constant Summary

NODES = {ClassDef, ModuleDef, EnumDef, LibDef, FunDef, TypeDef, TypeOf, CStructOrUnionDef, ProcLiteral, Block, Macro, MacroFor}

Non-exhaustive list of nodes to be visited by Ameba's rules.

RECORD_NODE_NAME = "record"
SPECIAL_NODE_NAMES = ["super", "previous_def"] of ::String

Constructors

Instance Method Summary

Instance methods inherited from class Ameba::AST::BaseVisitor

visit(node : Crystal::ASTNode) visit

Constructor methods inherited from class Ameba::AST::BaseVisitor

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

Constructor Detail

def self.new(rule, source, skip = nil) #

[View source]

Instance Method Detail

def end_visit(node : Crystal::TypeDeclaration) #

[View source]