class Prism::Translation::Ripper::SexpBuilderPP
niceties that flatten linked lists into arrays.
returns the same values as ::Ripper::SexpBuilder except with a couple of
This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that
def _dispatch_event_new
def _dispatch_event_new [] end
def _dispatch_event_push(list, item)
def _dispatch_event_push(list, item) list.push item list end
def on_heredoc_dedent(val, width)
def on_heredoc_dedent(val, width) val.map! do |e| next e if Symbol === e and /_content\z/ =~ e if Array === e and e[0] == :@tstring_content e = dedent_element(e, width) elsif String === e dedent_string(e, width) end e end val end
def on_mlhs_add_post(list, post)
def on_mlhs_add_post(list, post) list.concat(post) end
def on_mlhs_add_star(list, star)
def on_mlhs_add_star(list, star) list.push([:rest_param, star]) end
def on_mlhs_paren(list)
def on_mlhs_paren(list) [:mlhs, *list] end