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 attr res.syntaxSugar to Array.{get, set} #6343

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aspeddro
Copy link
Contributor

@aspeddro aspeddro commented Aug 13, 2023

Adding attribute because the internal representation of arr[idx] is Array.get and we don't have a way to distinguish both when issuing the token on the LSP.

See rescript-lang/rescript-vscode#801

@aspeddro aspeddro changed the title Add attr res.syntaxSugar to `Array.{get, set Add attr res.syntaxSugar to Array.{get, set} Aug 13, 2023
@cknitt
Copy link
Member

cknitt commented Sep 3, 2024

@aspeddro Shall we resurrect this PR?

Would you rebase it, add a comment somewhere explaining what the attribute is used for, and a CHANGELOG entry?

@aspeddro
Copy link
Contributor Author

I added a comment and updated the PR

@cknitt
Copy link
Member

cknitt commented Oct 13, 2024

Thanks a lot! 👍

Regarding the comment, I meant in the code, where this attribute is set.

Something else I am wondering about: The name res.syntaxSugar seems very generic to me. Wouldn't a more specific name like res.arrayGet/ res.arraySet be better maybe?

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.

2 participants