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

193 lines
4.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 52,
"ctxt": 0
},
"body": [
{
"type": "ForOfStatement",
"span": {
"start": 0,
"end": 52,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 5,
"end": 23,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 9,
"end": 23,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 9,
"end": 23,
"ctxt": 0
},
"elements": [
{
"type": "AssignmentPattern",
"span": {
"start": 10,
"end": 15,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 10,
"end": 11,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 14,
"end": 15,
"ctxt": 0
},
"value": 0.0
},
"typeAnnotation": null
},
{
"type": "AssignmentPattern",
"span": {
"start": 17,
"end": 22,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 27,
"end": 33,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 28,
"end": 29,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 31,
"end": 32,
"ctxt": 0
},
"value": 3.0
}
}
]
},
"body": {
"type": "BlockStatement",
"span": {
"start": 35,
"end": 52,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 41,
"end": 43,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 41,
"end": 42,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 48,
"end": 50,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
]
}
}
],
"interpreter": null
}