swc/crates/swc_ecma_parser/tests/tsc/ES5For-of29.json

219 lines
5.5 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 60,
"ctxt": 0
},
"body": [
{
"type": "ForOfStatement",
"span": {
"start": 0,
"end": 60,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 5,
"end": 31,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 11,
"end": 31,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 11,
"end": 31,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Identifier",
"span": {
"start": 12,
"end": 13,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "AssignmentPattern",
"span": {
"start": 15,
"end": 20,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 19,
"end": 20,
"ctxt": 0
},
"value": 0.0
},
"typeAnnotation": null
}
},
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Identifier",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": {
"type": "AssignmentPattern",
"span": {
"start": 25,
"end": 30,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 29,
"end": 30,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null
}
}
],
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 35,
"end": 41,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 36,
"end": 37,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 39,
"end": 40,
"ctxt": 0
},
"value": 3.0
}
}
]
},
"body": {
"type": "BlockStatement",
"span": {
"start": 43,
"end": 60,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 49,
"end": 51,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 56,
"end": 58,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 56,
"end": 57,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
]
}
}
],
"interpreter": null
}