def pretty_print(q)
objs = self.dup + [:__last__]
objs.unshift(type) if type && type != :list
options = []
if @docstring
options << ['docstring', docstring]
end
if @source_range || @line_range
options << ['line', line_range]
options << ['source', source_range]
end
objs.pop if options.size == 0
q.group(3, 's(', ')') do
q.seplist(objs, nil, :each) do |v|
if v == :__last__
q.seplist(options, nil, :each) do |arr|
k, v2 = *arr
q.group(3) do
q.text k
q.group(3) do
q.text ': '
q.pp v2
end
end
end
else
q.pp v
end
end
end
end