diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2023-10-30 11:21:16 -0400 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-10-30 15:53:37 +0000 |
| commit | 7bf3d9343fc9ca34124026cb3806107a3a6ddf09 (patch) | |
| tree | 5bcd16e551689648a54893f266a812c89a1926bf /lib | |
| parent | 7d8cfa0a40475c59364605f83b1b892bf068ae30 (diff) | |
[ruby/prism] parse_inline_comments -> parse_comments
https://github.com/ruby/prism/commit/bd4d248fd6
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/prism/ffi.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/prism/ffi.rb b/lib/prism/ffi.rb index ae13474c31..39d51efdc4 100644 --- a/lib/prism/ffi.rb +++ b/lib/prism/ffi.rb @@ -70,7 +70,7 @@ module Prism "prism.h", "pm_version", "pm_parse_serialize", - "pm_parse_serialize_inline_comments", + "pm_parse_serialize_comments", "pm_lex_serialize", "pm_parse_lex_serialize" ) @@ -225,11 +225,11 @@ module Prism end end - # Mirror the Prism.parse_inline_comments API by using the serialization API. - def self.parse_inline_comments(code, filepath = nil) + # Mirror the Prism.parse_comments API by using the serialization API. + def self.parse_comments(code, filepath = nil) LibRubyParser::PrismBuffer.with do |buffer| metadata = [filepath.bytesize, filepath.b, 0].pack("LA*L") if filepath - LibRubyParser.pm_parse_serialize_inline_comments(code, code.bytesize, buffer.pointer, metadata) + LibRubyParser.pm_parse_serialize_comments(code, code.bytesize, buffer.pointer, metadata) source = Source.new(code) loader = Serialize::Loader.new(source, buffer.read) @@ -240,12 +240,12 @@ module Prism end end - # Mirror the Prism.parse_file_inline_comments API by using the serialization + # Mirror the Prism.parse_file_comments API by using the serialization # API. This uses native strings instead of Ruby strings because it allows us # to use mmap when it is available. - def self.parse_file_inline_comments(filepath) + def self.parse_file_comments(filepath) LibRubyParser::PrismString.with(filepath) do |string| - parse_inline_comments(string.read, filepath) + parse_comments(string.read, filepath) end end |
