class

Ameba::AST::TopLevelNodesVisitor

Inherits Crystal::Visitor < Reference < Object

AST Visitor that visits certain nodes at a top level, which can characterize the source (i.e. require statements, modules etc.)

Constructors

new(node : Crystal::ASTNode)

Creates a new instance of visitor

Source

Instance methods

require_nodes
Source
visit(node : Crystal::Expressions)

If a top level node is Crystal::Expressions, then always traverse the children.

Source
visit(node : Crystal::ASTNode)

A general visit method for rest of the nodes. Returns false, meaning all child nodes will not be traversed.

Source