module Ameba::AST::ScopeBuilding

Overview

Shared logic of the visitors constructing scopes: tracking variables, their assignments and references within the current scope.

Including types need to implement on_scope_enter and on_scope_end methods, and to initialize the top level @current_scope.

Direct including types

Defined in:

ameba/ast/visitors/scope_building.cr

Instance Method Summary

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.

NOTE Needs to be defined here, since the more specific overloads below would be shadowed by the one defined in the including type.


[View source]