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

Fix parsing error in exponent expressions with unary left-hand sides. #201

Merged
merged 2 commits into from
Nov 2, 2021

Conversation

jogibear9988
Copy link
Contributor

Esprima (correctly) rejects expressions like -1**2. - jquery/esprima#2070
However, expressions like (-1)**2 are valid but still rejected.
This commit fixes this issue by identifying when the left operand
is parenthesized.

Fixes jquery/esprima#1981

Esprima (correctly) rejects expressions like -1**2. - jquery/esprima#2070
However, expressions like (-1)**2 are valid but still rejected.
This commit fixes this issue by identifying when the left operand
is parenthesized.

Fixes jquery/esprima#1981
@sebastienros
Copy link
Owner

Can you add the test case?

Copy link
Collaborator

@lahma lahma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good 👍🏻

@lahma lahma merged commit b7a1ed0 into sebastienros:main Nov 2, 2021
@jogibear9988 jogibear9988 deleted the fixUnaryHandLeftSides branch January 3, 2022 05:53
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.

Parsing error with unary and exponentiation operator
3 participants