Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Fix definition references for declarations #262

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Conversation

alxkzmn
Copy link
Collaborator

@alxkzmn alxkzmn commented Jun 20, 2024

There was a small issue with how we were recording the definition references for declarations. We were counting the whole entry of the AST as its definition. For example, here:

state new_state {
...
}

the definition start was the start of the word "state" and the end was the closing curly bracket. This PR fixes the definition references to be the span of the identifier (in this example, just the new_state).
Benefits:

  • allows to distinguish between comma-separated declarations (which otherwise would have the same dsym value);
  • enables the language server to correctly identify the symbols.

@alxkzmn alxkzmn requested review from leolara and rutefig June 20, 2024 06:43
@alxkzmn alxkzmn merged commit 3d35bd5 into chiquito-2024 Jun 25, 2024
4 checks passed
@alxkzmn alxkzmn deleted the language-server branch June 25, 2024 08:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants