facebook / regenerator

Source transformer enabling ECMAScript 6 generator functions in JavaScript-of-today.
http://facebook.github.io/regenerator/
MIT License
3.82k stars 1.16k forks source link

Do not use `-1` to mark uninitialized location numeric literals #680

Closed nicolo-ribaudo closed 1 year ago

nicolo-ribaudo commented 1 year ago

In Babel 8 we are going to improve validation in the t.numericLiteral builder to only allow valid numeric literals, and it will start throwing for -1 (since -1 should be represented as an unary expression).