Files
serenity/Userland/Libraries/LibJS/Parser.cpp
Luke Wilde c7f707afa6 LibJS: Allow division after IdentifierNames in optional chain
The following syntax is valid:
```js
e?.example / 1.2
```

Previously, the `/` would be treated as a unterminated regex literal,
because it was calling the regular `consume` instead of
`consume_and_allow_division`.

This is what is done when parsing IdentifierNames in
parse_secondary_expression when a period is encountered.

Allows us to parse clients-main-[hash].js on https://ubereats.com/

(cherry picked from commit bd4c29322c945647c52ff4d8045c7529f8152b08)
2024-11-11 17:22:05 -05:00

228 KiB