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

Static property fails to parse #2111

Open
OndrejSpanel opened this issue Feb 25, 2022 · 1 comment
Open

Static property fails to parse #2111

OndrejSpanel opened this issue Feb 25, 2022 · 1 comment

Comments

@OndrejSpanel
Copy link

OndrejSpanel commented Feb 25, 2022

Steps to reproduce

Parse following code:

class ClassWithStaticMethod {
  static staticProperty = 'someValue';
}

The code fails to parse, this can be reproduced using https://esprima.org/demo/parse.html

Actual output

The error is:

Error: Line 2: Unexpected token =

Relevant references

The code is extracted from example https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/static

@jogibear9988
Copy link

should work in esprima-next: https://github.com/node-projects/esprima-next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants