def accept(visitor)
      visitor.visit(self)
      if @children
        visitor.before_children if visitor.respond_to?(:before_children)
        @children.each { |c| c.accept(visitor) }
        visitor.after_children if visitor.respond_to?(:after_children)
      end
    end
def accept(visitor)
      visitor.visit(self)
      if @children
        visitor.before_children if visitor.respond_to?(:before_children)
        @children.each { |c| c.accept(visitor) }
        visitor.after_children if visitor.respond_to?(:after_children)
      end
    end
Entry point for visitors depth-first style: start by visiting `self` then
 visit all of its children