mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 05:55:46 +02:00
parent
32b1dea566
commit
1d51e929b1
2 changed files with 7 additions and 3 deletions
|
@ -1536,13 +1536,13 @@ module Prism
|
|||
# Parse the given source and translate it into the seattlerb/ruby_parser
|
||||
# gem's Sexp format.
|
||||
def parse(source, filepath = "(string)")
|
||||
translate(Prism.parse(source, filepath: filepath), filepath)
|
||||
translate(Prism.parse(source, filepath: filepath, scopes: [[]]), filepath)
|
||||
end
|
||||
|
||||
# Parse the given file and translate it into the seattlerb/ruby_parser
|
||||
# gem's Sexp format.
|
||||
def parse_file(filepath)
|
||||
translate(Prism.parse_file(filepath), filepath)
|
||||
translate(Prism.parse_file(filepath, scopes: [[]]), filepath)
|
||||
end
|
||||
|
||||
class << self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue