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

289 lines
7.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 120,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 9,
"end": 12,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 0,
"end": 39,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 15,
"end": 39,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 21,
"end": 37,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 28,
"end": 36,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 33,
"end": 34,
"ctxt": 0
},
"value": 0.0
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ForOfStatement",
"span": {
"start": 40,
"end": 120,
"ctxt": 0
},
"await": null,
"left": {
"type": "MemberExpression",
"span": {
"start": 45,
"end": 52,
"ctxt": 0
},
"object": {
"type": "CallExpression",
"span": {
"start": 45,
"end": 50,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 45,
"end": 48,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"property": {
"type": "Identifier",
"span": {
"start": 51,
"end": 52,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 56,
"end": 58,
"ctxt": 0
},
"elements": []
},
"body": {
"type": "BlockStatement",
"span": {
"start": 60,
"end": 120,
"ctxt": 0
},
"stmts": [
{
"type": "ForOfStatement",
"span": {
"start": 66,
"end": 118,
"ctxt": 0
},
"await": null,
"left": {
"type": "MemberExpression",
"span": {
"start": 71,
"end": 78,
"ctxt": 0
},
"object": {
"type": "CallExpression",
"span": {
"start": 71,
"end": 76,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 71,
"end": 74,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"property": {
"type": "Identifier",
"span": {
"start": 77,
"end": 78,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 82,
"end": 84,
"ctxt": 0
},
"elements": []
},
"body": {
"type": "BlockStatement",
"span": {
"start": 86,
"end": 118,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 96,
"end": 112,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 100,
"end": 111,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 100,
"end": 101,
"ctxt": 0
},
"value": "p",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 104,
"end": 111,
"ctxt": 0
},
"object": {
"type": "CallExpression",
"span": {
"start": 104,
"end": 109,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 104,
"end": 107,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"property": {
"type": "Identifier",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
}
]
}
}
]
}
}
],
"interpreter": null
}