Method: Prism::Translation::RubyParser#parse

Defined in:
lib/prism/translation/ruby_parser.rb

#parse(source, filepath = "(string)") ⇒ Object

Parse the given source and translate it into the seattlerb/ruby_parser gem’s Sexp format.



1607
1608
1609
# File 'lib/prism/translation/ruby_parser.rb', line 1607

def parse(source, filepath = "(string)")
  translate(Prism.parse(source, filepath: filepath, partial_script: true), filepath)
end