-
Notifications
You must be signed in to change notification settings - Fork 786
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
Parsing error with unary and exponentiation operator #1981
Open
stonegray opened this issue
Jul 16, 2019
· 0 comments
· Fixed by sebastienros/esprima-dotnet#201 · May be fixed by #2070
Open
Parsing error with unary and exponentiation operator #1981
stonegray opened this issue
Jul 16, 2019
· 0 comments
· Fixed by sebastienros/esprima-dotnet#201 · May be fixed by #2070
Comments
luiscubal
added a commit
to luiscubal/esprima
that referenced
this issue
Mar 8, 2021
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
jogibear9988
added a commit
to jogibear9988/esprima-dotnet
that referenced
this issue
Nov 1, 2021
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/esprima#1981
jogibear9988
added a commit
to jogibear9988/esprima-dotnet
that referenced
this issue
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 issue
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 issue
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
Esprima does not seem to correctly parse the following code.
Steps to reproduce
Actual output
The error does not occur for
2**(+4)
, so it appears to be specific to the base.The error does not occur for
(1+2)**4
, so it appears to be specific to the unary operator.The same error does occur for the following similar expressions:
(-2)**4
,(~~2)**4
Relevant references
Unary operator: 12.5.6.1
Exponentiation operator: 12.6.4
The text was updated successfully, but these errors were encountered: