class SyntaxTree::BasicVisitor
def visit_method(method_name)
name. It will raise an error if the visit method you're defining isn't
If you use this method, you can ensure you're writing the correct method
override these parent methods.
the visitor since it's perfectly valid to define methods that don't
It's not always easy to ensure you're writing the correct method name in
This method is here to help folks write visitors.
def visit_method(method_name) return if valid_visit_methods.include?(method_name) raise VisitMethodError, method_name end