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

Support ES2022 class-private-fields-in syntax #1068

Merged
merged 1 commit into from
Sep 13, 2021
Merged

Support ES2022 class-private-fields-in syntax #1068

merged 1 commit into from
Sep 13, 2021

Conversation

cool-little-fish
Copy link
Contributor

FIX #1067

@cool-little-fish cool-little-fish changed the title Support ES2022 class private fields private in syntax Support ES2022 class-private-fields-in syntax Sep 10, 2021
@marijnh
Copy link
Member

marijnh commented Sep 12, 2021

Any particular reason you decided to put this in parseExprAtom instead of special-casing it in parseExprOp? At a glance, it seems like this makes it easy for unsyntactic private fields to 'escape' the check in buildBinary (I believe the current code will accept class extends #foo, for example).

@cool-little-fish
Copy link
Contributor Author

Thanks for reminding,you are right, I will modify current implementation according to your advice.

FIX #1067

FEATURE: Allow parsing class private fields with in operator
@cool-little-fish
Copy link
Contributor Author

already updated the implementation

@marijnh marijnh merged commit 9cff83e into acornjs:master Sep 13, 2021
@marijnh
Copy link
Member

marijnh commented Sep 13, 2021

That addresses my concern, thanks. Merged.

@mkubilayk
Copy link

It's great to see that this is already implemented in Acorn. Thanks!

Is there any chance we can get this feature released soon @marijnh? We'd greatly appreciate that. I believe it'll also unblock some ESLint work linked above.

@marijnh
Copy link
Member

marijnh commented Nov 18, 2021

Tagged 8.6.0 with this patch.

@mkubilayk
Copy link

Thanks a lot!

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.

Feature: ES2022 Ergonomic brand checks for Private Fields
3 participants