module RubyLsp::Requests::Support::Common

def range_from_location(location)

: ((Prism::Location | RubyIndexer::Location) location) -> Interface::Range
def range_from_location(location)
  Interface::Range.new(
    start: Interface::Position.new(
      line: location.start_line - 1,
      character: location.start_column,
    ),
    end: Interface::Position.new(line: location.end_line - 1, character: location.end_column),
  )
end