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

197 lines
4.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 48,
"end": 100,
"ctxt": 0
},
"body": [
{
"type": "ForOfStatement",
"span": {
"start": 48,
"end": 100,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 53,
"end": 71,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 57,
"end": 71,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 57,
"end": 71,
"ctxt": 0
},
"elements": [
{
"type": "AssignmentPattern",
"span": {
"start": 58,
"end": 63,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 62,
"end": 63,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"typeAnnotation": null
},
{
"type": "AssignmentPattern",
"span": {
"start": 65,
"end": 70,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 65,
"end": 66,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 69,
"end": 70,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 75,
"end": 81,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 79,
"end": 80,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
]
},
"body": {
"type": "BlockStatement",
"span": {
"start": 83,
"end": 100,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 89,
"end": 91,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 89,
"end": 90,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 96,
"end": 98,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 96,
"end": 97,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
]
}
}
],
"interpreter": null
}