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

211 lines
4.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 64,
"ctxt": 0
},
"body": [
{
"type": "ForOfStatement",
"span": {
"start": 0,
"end": 64,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 5,
"end": 10,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 9,
"end": 10,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 9,
"end": 10,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 14,
"end": 23,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 18,
"end": 19,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": 3.0
}
}
]
},
"body": {
"type": "BlockStatement",
"span": {
"start": 25,
"end": 64,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 31,
"end": 42,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 35,
"end": 41,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 35,
"end": 37,
"ctxt": 0
},
"value": "_a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 40,
"end": 41,
"ctxt": 0
},
"value": 0.0
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 47,
"end": 62,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 47,
"end": 61,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 47,
"end": 58,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 47,
"end": 54,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 55,
"end": 58,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 59,
"end": 60,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
],
"typeArguments": null
}
}
]
}
}
],
"interpreter": null
}