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

Add code unit APIs to location #2406

Merged
merged 1 commit into from
Feb 13, 2024
Merged

Add code unit APIs to location #2406

merged 1 commit into from
Feb 13, 2024

Conversation

kddnewton
Copy link
Collaborator

LSPs need this because the protocol dictates that you return code units for offsets. None of our existing APIs provided that information, and since we hid the source it's not nearly as useful for them. Now they can pass an encoding directly to:

  • Location#start_code_units_offset
  • Location#end_code_units_offset
  • Location#start_code_units_column
  • Location#end_code_units_column

LSPs need this because the protocol dictates that you return code
units for offsets. None of our existing APIs provided that
information, and since we hid the source it's not nearly as useful
for them. Now they can pass an encoding directly to:

* Location#start_code_units_offset
* Location#end_code_units_offset
* Location#start_code_units_column
* Location#end_code_units_column

Co-Authored-By: Vinicius Stock <vinicius.stock@shopify.com>
@kddnewton kddnewton merged commit 218b83b into main Feb 13, 2024
55 checks passed
@kddnewton kddnewton deleted the code-units branch February 13, 2024 20:10
@eregon
Copy link
Member

eregon commented Feb 13, 2024

Nice, this should address the code unit stuff discussed in #1788

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

Successfully merging this pull request may close these issues.

None yet

2 participants