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

193 lines
4.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 47,
"end": 99,
"ctxt": 0
},
"body": [
{
"type": "ForOfStatement",
"span": {
"start": 47,
"end": 99,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 52,
"end": 70,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 56,
"end": 70,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 56,
"end": 70,
"ctxt": 0
},
"elements": [
{
"type": "AssignmentPattern",
"span": {
"start": 57,
"end": 62,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 61,
"end": 62,
"ctxt": 0
},
"value": 0.0
},
"typeAnnotation": null
},
{
"type": "AssignmentPattern",
"span": {
"start": 64,
"end": 69,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 64,
"end": 65,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 74,
"end": 80,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 78,
"end": 79,
"ctxt": 0
},
"value": 3.0
}
}
]
},
"body": {
"type": "BlockStatement",
"span": {
"start": 82,
"end": 99,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 88,
"end": 90,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 95,
"end": 97,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 95,
"end": 96,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
]
}
}
],
"interpreter": null
}