Trailing comma after rest - The final fix (#10491)
* [parser] Track trailing commas in extras instead of state * Update existing tests * Update test262 whitelist * Improve error message and location * nit * Use lookaheadCharCode
This commit is contained in:
@@ -55,11 +55,6 @@ export default class State {
|
||||
// ^
|
||||
noArrowParamsConversionAt: number[] = [];
|
||||
|
||||
// A comma after "...a" is only allowed in spread, but not in rest.
|
||||
// Since we parse destructuring patterns as array/object literals
|
||||
// and then convert them, we need to track it.
|
||||
commaAfterSpreadAt: number = -1;
|
||||
|
||||
// Flags to track
|
||||
inParameters: boolean = false;
|
||||
maybeInArrowParameters: boolean = false;
|
||||
|
||||
Reference in New Issue
Block a user