class
Ameba::AST::EnclosingLoopVisitor
- Ameba::AST::EnclosingLoopVisitor
- Crystal::Visitor
- Reference
- Object
Overview
AST Visitor that finds the loops (while / until) enclosing the given node.
Defined in:
ameba/ast/visitors/enclosing_loop_visitor.crConstructors
-
.new(node : Crystal::ASTNode, target : Crystal::ASTNode)
Creates a new visitor of the node, finding the loops enclosing the target
Instance Method Summary
-
#loops : Array(Crystal::ASTNode)
The loops enclosing the target node, from the outermost one
Constructor Detail
def self.new(node : Crystal::ASTNode, target : Crystal::ASTNode)
#
Creates a new visitor of the node, finding the loops enclosing the target