* [parser] Track trailing commas in extras instead of state * Update existing tests * Update test262 whitelist * Improve error message and location * nit * Use lookaheadCharCode
144 lines
3.0 KiB
JSON
144 lines
3.0 KiB
JSON
{
|
|
"type": "File",
|
|
"start": 0,
|
|
"end": 16,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 16
|
|
}
|
|
},
|
|
"program": {
|
|
"type": "Program",
|
|
"start": 0,
|
|
"end": 16,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 16
|
|
}
|
|
},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start": 0,
|
|
"end": 16,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 16
|
|
}
|
|
},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"start": 0,
|
|
"end": 15,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15
|
|
}
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"start": 0,
|
|
"end": 3,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 3
|
|
},
|
|
"identifierName": "log"
|
|
},
|
|
"name": "log"
|
|
},
|
|
"extra": {
|
|
"trailingComma": 13
|
|
},
|
|
"arguments": [
|
|
{
|
|
"type": "Identifier",
|
|
"start": 4,
|
|
"end": 5,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 4
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 5
|
|
},
|
|
"identifierName": "n"
|
|
},
|
|
"name": "n"
|
|
},
|
|
{
|
|
"type": "StringLiteral",
|
|
"start": 7,
|
|
"end": 10,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 7
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 10
|
|
}
|
|
},
|
|
"extra": {
|
|
"rawValue": "=",
|
|
"raw": "'='"
|
|
},
|
|
"value": "="
|
|
},
|
|
{
|
|
"type": "NumericLiteral",
|
|
"start": 12,
|
|
"end": 13,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 12
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 13
|
|
}
|
|
},
|
|
"extra": {
|
|
"rawValue": 2,
|
|
"raw": "2"
|
|
},
|
|
"value": 2
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |