* [parser] Track trailing commas in extras instead of state * Update existing tests * Update test262 whitelist * Improve error message and location * nit * Use lookaheadCharCode
104 lines
2.0 KiB
JSON
104 lines
2.0 KiB
JSON
{
|
|
"type": "File",
|
|
"start": 0,
|
|
"end": 10,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 10
|
|
}
|
|
},
|
|
"program": {
|
|
"type": "Program",
|
|
"start": 0,
|
|
"end": 10,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 10
|
|
}
|
|
},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start": 0,
|
|
"end": 10,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 10
|
|
}
|
|
},
|
|
"expression": {
|
|
"type": "ObjectExpression",
|
|
"start": 1,
|
|
"end": 8,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 8
|
|
}
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "SpreadElement",
|
|
"start": 2,
|
|
"end": 6,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 6
|
|
}
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"start": 5,
|
|
"end": 6,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 5
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 6
|
|
},
|
|
"identifierName": "a"
|
|
},
|
|
"name": "a"
|
|
}
|
|
}
|
|
],
|
|
"extra": {
|
|
"trailingComma": 6,
|
|
"parenthesized": true,
|
|
"parenStart": 0
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |