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 private fields for classes with #-prefix #541

Closed
wants to merge 1 commit into from

Conversation

ArneBab
Copy link
Contributor

@ArneBab ArneBab commented Nov 19, 2019

With this change the parser no longer treats private fields in Javascript classes (https://github.com/tc39/proposal-class-fields) as errors.

With this change the parser no longer treats private fields in Javascript classes (https://github.com/tc39/proposal-class-fields) as errors.
@ArneBab
Copy link
Contributor Author

ArneBab commented Apr 23, 2020

This is currently missing this test:

(js2-deftest-parse parse-class-private-field-no-init-assigned
  "class C {\n  #x\n  \"z\"\n  456\n  _setY() {  this.#x = 1;\n}\n}"
  :warnings-count 0)

@JeremyPouyet
Copy link

Works for me! Thanks. The possibility to customize the color would be a great addition.

@ArneBab
Copy link
Contributor Author

ArneBab commented Jun 1, 2020

@JeremyPouyet please have a look here for an option with less maintenance burden: #537 (comment)

@dgutov dgutov closed this Jul 10, 2021
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.

3 participants