We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Parse the following code:
esprima.parse('(-1) ** 2')
The expression (-1) ** 2 is accepted by mainstream browsers as valid and I believe that Esprima should accept it as well.
Esprima fails with the following error:
> esprima.parse('(-1)**2') Uncaught Error: Line 1: Unexpected token ** <stack trace>
The reason for Esprima's failure is that it identifies "(-1) ** 2" as "-1 ** 2" which is indeed invalid.
The text was updated successfully, but these errors were encountered:
Nevermind, I think this is a duplicate of #1981
Sorry, something went wrong.
No branches or pull requests
Steps to reproduce
Parse the following code:
Expected output
The expression (-1) ** 2 is accepted by mainstream browsers as valid and I believe that Esprima should accept it as well.
Actual output
Esprima fails with the following error:
Relevant references
The reason for Esprima's failure is that it identifies "(-1) ** 2" as "-1 ** 2" which is indeed invalid.
The text was updated successfully, but these errors were encountered: