swc/crates/swc_ecma_parser/tests/tsc/for-inStatementsDestructuring3.json

126 lines
2.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 33,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 10,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 8,
"end": 9,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 8,
"end": 9,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
{
"type": "ForInStatement",
"span": {
"start": 11,
"end": 33,
"ctxt": 0
},
"left": {
"type": "ArrayPattern",
"span": {
"start": 16,
"end": 22,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 26,
"end": 28,
"ctxt": 0
},
"elements": []
},
"body": {
"type": "BlockStatement",
"span": {
"start": 30,
"end": 33,
"ctxt": 0
},
"stmts": []
}
}
],
"interpreter": null
}