-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
JS: Private fields #1950
JS: Private fields #1950
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure the private field symbol is an operator, but I'm not really sure what it is, so this works for me.
I made it an operator because I wanted some highlighting but looking at this it might have been the wrong choice.
The spec. Maybe a new token (e.g.
|
If it's part of the name, then maybe it shouldn't be highlighted separately? Especially if it's supposed to be part of the name as the "mental model", we'd be do a disservice to that way of thinking by highlighting it separately. Not in love with a new token, unless you're suggesting aliasing it to |
That's true. Since it's not clear yet as to whether and how we should highlight the The PR is not closed because the function and function variables tokens have to be adjusted (see new test). |
Re-reviewed and adjusted JS Extras. I think it's ready. |
This PR adds support for JS's new private field by highlighting the
#
as an operator.Example