class Ameba::AST::EnclosingLoopVisitor

Overview

AST Visitor that finds the loops (while / until) enclosing the given node.

Defined in:

ameba/ast/visitors/enclosing_loop_visitor.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(node : Crystal::ASTNode, target : Crystal::ASTNode) #

Creates a new visitor of the node, finding the loops enclosing the target


[View source]

Instance Method Detail

def loops : Array(Crystal::ASTNode) #

The loops enclosing the target node, from the outermost one


[View source]