It is currently possible to convert a byte offset into a line-column pair using Source::get_byte_line, but don't see a way to do the inverse operation. It would be a very useful feature when interoperating with LSP, which uses line-column pairs. Is it possible to add? I think it might be enough to make the method Line::byte_span public.
It is currently possible to convert a byte offset into a line-column pair using
Source::get_byte_line
, but don't see a way to do the inverse operation. It would be a very useful feature when interoperating with LSP, which uses line-column pairs. Is it possible to add? I think it might be enough to make the methodLine::byte_span
public.