Commit 9d19795
committed
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#19811 parent 27ad334 commit 9d19795
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1860 | 1860 | | |
1861 | 1861 | | |
1862 | 1862 | | |
1863 | | - | |
1864 | | - | |
1865 | | - | |
1866 | | - | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
1867 | 1871 | | |
1868 | 1872 | | |
1869 | 1873 | | |
| |||
0 commit comments