def exit_node(tree_node)
      parent = @stack.last
      if @delegate
        @delegate.exit_node(tree_node) if @delegate.respond_to? :exit_node
      else
        @on_exit_tree_node_blocks.each do |b|
          if b.arity == 1
            b.call(tree_node)
          elsif b.arity == 2
            b.call(tree_node, parent)
          end
        end
      end
      @stack.pop
    end
def exit_node(tree_node)
      parent = @stack.last
      if @delegate
        @delegate.exit_node(tree_node) if @delegate.respond_to? :exit_node
      else
        @on_exit_tree_node_blocks.each do |b|
          if b.arity == 1
            b.call(tree_node)
          elsif b.arity == 2
            b.call(tree_node, parent)
          end
        end
      end
      @stack.pop
    end
called on tree node at end of the visit i.e. oll subtree are visited