swc/crates/swc_ecma_parser/tests/tsc/ES5For-of1.json
2022-03-22 07:54:08 +00:00

173 lines
3.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 19,
"end": 73,
"ctxt": 0
},
"body": [
{
"type": "ForOfStatement",
"span": {
"start": 19,
"end": 73,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 24,
"end": 29,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 28,
"end": 29,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 28,
"end": 29,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 33,
"end": 48,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 34,
"end": 37,
"ctxt": 0
},
"value": "a",
"raw": "'a'"
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 39,
"end": 42,
"ctxt": 0
},
"value": "b",
"raw": "'b'"
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 44,
"end": 47,
"ctxt": 0
},
"value": "c",
"raw": "'c'"
}
}
]
},
"body": {
"type": "BlockStatement",
"span": {
"start": 50,
"end": 73,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 56,
"end": 71,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 56,
"end": 70,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 56,
"end": 67,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 56,
"end": 63,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 64,
"end": 67,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": "v",
"optional": false
}
}
],
"typeArguments": null
}
}
]
}
}
],
"interpreter": null
}