swc/crates/swc_ecma_parser/tests/tsc/useObjectValuesAndEntries4.json
2022-02-04 17:08:38 +09:00

328 lines
7.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 33,
"end": 142,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 33,
"end": 56,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 37,
"end": 55,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"value": "o",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 41,
"end": 55,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 52,
"end": 53,
"ctxt": 0
},
"value": 2.0
}
}
]
},
"definite": false
}
]
},
{
"type": "ForOfStatement",
"span": {
"start": 58,
"end": 108,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 63,
"end": 68,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "CallExpression",
"span": {
"start": 72,
"end": 88,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 72,
"end": 85,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 72,
"end": 78,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 79,
"end": 85,
"ctxt": 0
},
"value": "values",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 86,
"end": 87,
"ctxt": 0
},
"value": "o",
"optional": false
}
}
],
"typeArguments": null
},
"body": {
"type": "BlockStatement",
"span": {
"start": 90,
"end": 108,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 96,
"end": 106,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 100,
"end": 105,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 100,
"end": 101,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"value": "x",
"optional": false
},
"definite": false
}
]
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 110,
"end": 142,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 114,
"end": 141,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 114,
"end": 121,
"ctxt": 0
},
"value": "entries",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 124,
"end": 141,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 124,
"end": 138,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 124,
"end": 130,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 131,
"end": 138,
"ctxt": 0
},
"value": "entries",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 139,
"end": 140,
"ctxt": 0
},
"value": "o",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}