class Prism::Translation::Ripper::SexpBuilder
returns the arrays of [type, *children].
This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that
def dedent_element(e, width)
def dedent_element(e, width) if (n = dedent_string(e[1], width)) > 0 e[2][1] += n end e end
def on_error(mesg)
def on_error(mesg) @error = mesg end
def on_heredoc_dedent(val, width)
def on_heredoc_dedent(val, width) sub = proc do |cont| cont.map! do |e| if Array === e case e[0] when :@tstring_content e = dedent_element(e, width) when /_add\z/ e[1] = sub[e[1]] end elsif String === e dedent_string(e, width) end e end end sub[val] val end