Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
ErrorHighlight::Spotter#prism_location
prism_location(location)
lib/error_highlight/base.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/error_highlight/base.rb, line 745
def prism_location(location)
@beg_lineno = location.start_line
@beg_column = location.start_column
@end_lineno = location.end_line
@end_column = location.end_column
@snippet = @fetch[@beg_lineno, @end_lineno]
end
Take a location from the prism parser and set the necessary instance variables.