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

215 lines
5.1 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 1,
"end": 65,
"ctxt": 0
},
"body": [
{
"type": "ForOfStatement",
"span": {
"start": 1,
"end": 65,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 6,
"end": 11,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 10,
"end": 11,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 10,
"end": 11,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 15,
"end": 24,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 16,
"end": 17,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 19,
"end": 20,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
]
},
"body": {
"type": "BlockStatement",
"span": {
"start": 26,
"end": 65,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 32,
"end": 43,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 36,
"end": 42,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 36,
"end": 38,
"ctxt": 0
},
"value": "_a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 41,
"end": 42,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 48,
"end": 63,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 48,
"end": 62,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 48,
"end": 59,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 48,
"end": 55,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 56,
"end": 59,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 60,
"end": 61,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
],
"typeArguments": null
}
}
]
}
}
],
"interpreter": null
}