mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 10:12:25 -05:00
2d8b2328fd
This change makes LibJS correctly report a syntax error when a unary expression is followed by exponentiation, as the spec requires. Apparently this is due to that expression being ambiguous ordering. Strangely this check does not seem to apply in the same way for '++' and '--' for reasons that I don't fully understand. For example ``` let x = 5; ++x ** 2 ``` Since `--5` and `++5` on it's own results in a syntax error anyway, it seems we do not need to perform this exponentiation check in those places. Diff Tests: +6 ✅ -6 ❌ |
||
---|---|---|
.. | ||
async-await.js | ||
async-generators.js | ||
coalesce-logic-expression-mixing.js | ||
destructuring-assignment.js | ||
dynamic-import-usage.js | ||
for-loop-invalid-in.js | ||
function-hoisting.js | ||
functions-in-tree-order-non-strict.js | ||
functions-in-tree-order-strict.js | ||
generators.js | ||
if-statement-empty-completion.js | ||
new-with-optional-chaining.js | ||
numeric-separator.js | ||
optional-chaining.js | ||
slash-after-block.js | ||
switch-as-statement.js | ||
syntax-error-unary-expression-before-exponentiation.js |