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

223 lines
5.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 48,
"end": 108,
"ctxt": 0
},
"body": [
{
"type": "ForOfStatement",
"span": {
"start": 48,
"end": 108,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 53,
"end": 79,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 59,
"end": 79,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 59,
"end": 79,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Identifier",
"span": {
"start": 60,
"end": 61,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "AssignmentPattern",
"span": {
"start": 63,
"end": 68,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 63,
"end": 64,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"typeAnnotation": null
}
},
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Identifier",
"span": {
"start": 70,
"end": 71,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": {
"type": "AssignmentPattern",
"span": {
"start": 73,
"end": 78,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 73,
"end": 74,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 77,
"end": 78,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"typeAnnotation": null
}
}
],
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 83,
"end": 89,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 87,
"end": 88,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
]
},
"body": {
"type": "BlockStatement",
"span": {
"start": 91,
"end": 108,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 97,
"end": 99,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 97,
"end": 98,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 104,
"end": 106,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
]
}
}
],
"interpreter": null
}