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

205 lines
5.3 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 110,
"ctxt": 0
},
"body": [
{
"type": "ForOfStatement",
"span": {
"start": 0,
"end": 110,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 5,
"end": 10,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 9,
"end": 10,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 9,
"end": 10,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 14,
"end": 16,
"ctxt": 0
},
"elements": []
},
"body": {
"type": "BlockStatement",
"span": {
"start": 18,
"end": 110,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 24,
"end": 26,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"value": "v",
"optional": false
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 40,
"end": 43,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 31,
"end": 108,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 46,
"end": 108,
"ctxt": 0
},
"stmts": [
{
"type": "ForOfStatement",
"span": {
"start": 56,
"end": 102,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 61,
"end": 68,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 72,
"end": 74,
"ctxt": 0
},
"elements": []
},
"body": {
"type": "BlockStatement",
"span": {
"start": 76,
"end": 102,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 90,
"end": 92,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 90,
"end": 91,
"ctxt": 0
},
"value": "v",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
]
}
}
],
"interpreter": null
}