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. #2070

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

luiscubal
Copy link

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

Fixes #1981

Esprima (correctly) rejects expressions like -1**2.
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#1981
Base automatically changed from master to main March 16, 2021 16:37
jogibear9988 added a commit to jogibear9988/esprima-dotnet that referenced this pull request Nov 2, 2021
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
lahma pushed a commit to sebastienros/esprima-dotnet that referenced this pull request Nov 2, 2021
…201)

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

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

* add test for unary left side
JohnWinston329 added a commit to JohnWinston329/esprima-dotnet that referenced this pull request Dec 28, 2023
…(#201)

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

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

* add test for unary left side
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Parsing error with unary and exponentiation operator
1 participant