Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
Prism::Location.new
new(source, start_offset, length)
lib/prism/parse_result.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/prism/parse_result.rb, line 288
def initialize(source, start_offset, length)
@source = source
@start_offset = start_offset
@length = length
# These are used to store comments that are associated with this location.
# They are initialized to `nil` to save on memory when there are no
# comments to be attached and/or the comment-related APIs are not used.
@leading_comments = nil
@trailing_comments = nil
end
Create a new location object with the given source, start byte offset, and byte length.