swc/crates/swc_ecma_parser/tests/tsc/ES5For-of1.json
2023-03-12 04:50:28 +00:00

173 lines
3.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 20,
"end": 74,
"ctxt": 0
},
"body": [
{
"type": "ForOfStatement",
"span": {
"start": 20,
"end": 74,
"ctxt": 0
},
"await": false,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 25,
"end": 30,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 29,
"end": 30,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 29,
"end": 30,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 34,
"end": 49,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 35,
"end": 38,
"ctxt": 0
},
"value": "a",
"raw": "'a'"
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 40,
"end": 43,
"ctxt": 0
},
"value": "b",
"raw": "'b'"
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 45,
"end": 48,
"ctxt": 0
},
"value": "c",
"raw": "'c'"
}
}
]
},
"body": {
"type": "BlockStatement",
"span": {
"start": 51,
"end": 74,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 57,
"end": 72,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 57,
"end": 71,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 57,
"end": 68,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 57,
"end": 64,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 65,
"end": 68,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 69,
"end": 70,
"ctxt": 0
},
"value": "v",
"optional": false
}
}
],
"typeArguments": null
}
}
]
}
}
],
"interpreter": null
}