Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for converting line-column pair into byte offset #132

Open
segeljakt opened this issue Oct 30, 2024 · 0 comments
Open

Support for converting line-column pair into byte offset #132

segeljakt opened this issue Oct 30, 2024 · 0 comments

Comments

@segeljakt
Copy link

segeljakt commented Oct 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant