* [parser] Track trailing commas in extras instead of state * Update existing tests * Update test262 whitelist * Improve error message and location * nit * Use lookaheadCharCode
108 lines
2.0 KiB
JSON
108 lines
2.0 KiB
JSON
{
|
|
"type": "File",
|
|
"start": 0,
|
|
"end": 6,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 6
|
|
}
|
|
},
|
|
"program": {
|
|
"type": "Program",
|
|
"start": 0,
|
|
"end": 6,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 6
|
|
}
|
|
},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start": 0,
|
|
"end": 6,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 6
|
|
}
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"start": 0,
|
|
"end": 6,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 6
|
|
}
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "ArrayPattern",
|
|
"start": 0,
|
|
"end": 4,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 4
|
|
}
|
|
},
|
|
"elements": [
|
|
null,
|
|
null
|
|
],
|
|
"extra": {
|
|
"trailingComma": 2
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"start": 5,
|
|
"end": 6,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 5
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 6
|
|
}
|
|
},
|
|
"extra": {
|
|
"rawValue": 0,
|
|
"raw": "0"
|
|
},
|
|
"value": 0
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |