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