1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-12 23:01:01 +00:00
serenity/Userland
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
..
Applets Userland: Make Window::set_main_widget() non-fallible 2023-09-21 10:20:23 +02:00
Applications Browser: Add support for color pickers 2023-09-27 12:16:41 +01:00
BuggieBox checksum: Add support for BLAKE2b 2023-09-17 16:49:35 +03:30
Demos Userland: Use non-fallible EventReceiver::add() where possible 2023-09-25 10:58:31 +02:00
DevTools LibCore: Make MappedFile OwnPtr-based 2023-09-27 03:22:56 +02:00
DynamicLoader CMake: Use CMAKE_POSITION_INDEPENDENT_CODE instead of explicit -fpic 2023-09-18 10:26:42 +02:00
Games GameOfLife: Don't toggle cells on mouse move when placing patterns 2023-09-27 19:12:14 +02:00
Libraries LibJS: Syntax error for a unary expression followed by exponentiation 2023-09-28 13:11:11 +02:00
Services LibWeb+LibWebView+WebContent: Add support for <input type="color"> 2023-09-27 12:16:41 +01:00
Shell Shell: Allow the user to set the prompt using PROMPT() 2023-09-07 11:52:37 -06:00
Utilities less: Add the -F option to quit if the input fits on one screen 2023-09-27 20:00:34 +02:00
CMakeLists.txt Userland: Add the BuggieBox program 2022-11-26 12:41:47 -07:00