def to_s(indent = 0)
      [
        '  ' * indent,
        '(',
        fancy_type,
        *children.map do |child, idx|
          if child.is_a?(Node)
            "\n#{child.to_s(indent + 1)}"
          else
            " #{child.inspect}"
          end
        end,
        ')',
      ].join
    end
def to_s(indent = 0)
      [
        '  ' * indent,
        '(',
        fancy_type,
        *children.map do |child, idx|
          if child.is_a?(Node)
            "\n#{child.to_s(indent + 1)}"
          else
            " #{child.inspect}"
          end
        end,
        ')',
      ].join
    end
Adapted from https://github.com/whitequark/ast/blob/master/lib/ast/node.rb