Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Prism::Translation::Parser::Compiler#srange
srange(location)
lib/prism/translation/parser/compiler.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/prism/translation/parser/compiler.rb, line 1991
def srange(location)
Range.new(source_buffer, offset_cache[location.start_offset], offset_cache[location.end_offset]) if location
end
Constructs a new source range from the given start and end offsets.