Nicolò Ribaudo 34937f13d5
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
2019-10-08 23:08:50 +02:00

178 lines
4.1 KiB
JSON

{
"type": "File",
"start": 0,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 37
}
},
"program": {
"type": "Program",
"start": 0,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 37
}
},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 37
}
},
"expression": {
"type": "ObjectExpression",
"start": 1,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 36
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 3,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 3
},
"end": {
"line": 1,
"column": 18
}
},
"method": false,
"key": {
"type": "Identifier",
"start": 3,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 3
},
"end": {
"line": 1,
"column": 12
},
"identifierName": "__proto__"
},
"name": "__proto__"
},
"computed": false,
"shorthand": false,
"value": {
"type": "NullLiteral",
"start": 14,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 18
}
}
}
},
{
"type": "ObjectMethod",
"start": 20,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 33
}
},
"method": true,
"key": {
"type": "Identifier",
"start": 20,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 29
},
"identifierName": "__proto__"
},
"name": "__proto__"
},
"computed": false,
"kind": "method",
"id": null,
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 31,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 31
},
"end": {
"line": 1,
"column": 33
}
},
"body": [],
"directives": []
}
}
],
"extra": {
"trailingComma": 33,
"parenthesized": true,
"parenStart": 0
}
}
}
],
"directives": []
}
}