Skip to content

Always use ISourceLocation for Rascal locations#929

Merged
toinehartman merged 5 commits intomainfrom
fix/rascal-lsp-locations
Dec 18, 2025
Merged

Always use ISourceLocation for Rascal locations#929
toinehartman merged 5 commits intomainfrom
fix/rascal-lsp-locations

Conversation

@toinehartman
Copy link
Member

@toinehartman toinehartman commented Dec 17, 2025

The mapping from LSP locations (lines 0-based, UTF-16 columns) to and from Rascal locations (lines 1-based, UTF-32 columns) often causes confusion (and comes up during reviews, e.g. here #706 (comment)). This is not at all improved by the reuse of LSP4J's Range and Position types for some Rascal locations. This PR

  1. Gets rid of this reuse and mandates the use of ISourceLocation for any kind of Rascal location.
  2. Aligns the names of functions in Locations by removing the last references to LSP from them, since now, the types speak for themselves.

@toinehartman toinehartman self-assigned this Dec 17, 2025
@toinehartman toinehartman added the enhancement New feature or request label Dec 17, 2025
@toinehartman toinehartman marked this pull request as ready for review December 17, 2025 15:00
@sonarqubecloud
Copy link

@toinehartman toinehartman merged commit fa325d6 into main Dec 18, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants