Skip to content

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