class Prism::Visitor


end
end
super
# Call super so that the visitor continues walking the tree
end
# Do something with the node
if node.name == “foo”
def visit_call_node(node)
class FooCalls < Prism::Visitor
could write:
For example, to find all of the method calls that call the ‘foo` method, you
subset of the tree, while still walking the whole tree.
caller needing to define any special handling. This allows you to handle a
method defined on the nodes. This means it can walk a tree without the
A visitor is a class that provides a default implementation for every accept