ladybird/Userland/Libraries/LibJS/Tests/syntax
Shannon Booth 2d8b2328fd LibJS: Syntax error for a unary expression followed by exponentiation
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 
2023-09-28 13:11:11 +02:00
..
async-await.js LibJS: Implement await properly for async functions 2023-08-10 05:12:07 +02:00
async-generators.js
coalesce-logic-expression-mixing.js LibJS: Parse secondary expressions with the original forbidden token set 2023-04-02 06:45:37 +02:00
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 LibJS: Add tests for new Obj with optional chain 2023-06-17 20:01:38 +02:00
numeric-separator.js
optional-chaining.js LibJS: Uncomment passing tests 2023-08-08 15:09:53 +02:00
slash-after-block.js LibJS: Parse slashes after reserved identifiers correctly 2023-06-10 07:20:33 +02:00
switch-as-statement.js
syntax-error-unary-expression-before-exponentiation.js LibJS: Syntax error for a unary expression followed by exponentiation 2023-09-28 13:11:11 +02:00