4c4316da72
Fail speculative parsing of arrow function expressions whenever it has a parameter with an initialiser that is missing '='. Ordinarily this is allowed for better error recovery in the language service, but for speculative parsing, the errors can compound. When the initialiser is an error, and when the '=>' is missing (which is also allowed), what is putatively an arrow function may actually be something else. For example, `(a / 8) + function () { }` is currently parsed as if someone had intended to write `(a = /8)+function()/) => { }` but they forgot the `=` of the initialiser, the `=>` of the lambda, forgot to close the regular expression, and mistakenly inserted a newline right after the regular expression. |
||
---|---|---|
.. | ||
ecmascript3/Accessors | ||
ecmascript5 | ||
ecmascript6 | ||
ecmascriptnext |