mirror of
https://github.com/swc-project/swc.git
synced 2024-12-01 01:13:56 +03:00
818 lines
20 KiB
JSON
818 lines
20 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 18,
|
|
"end": 315,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 18,
|
|
"end": 40,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 22,
|
|
"end": 39,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 22,
|
|
"end": 35,
|
|
"ctxt": 0
|
|
},
|
|
"value": "globalCounter",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 38,
|
|
"end": 39,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 50,
|
|
"end": 53,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 41,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 81,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 80,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "+=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 75,
|
|
"ctxt": 0
|
|
},
|
|
"value": "globalCounter",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 79,
|
|
"end": 80,
|
|
"ctxt": 0
|
|
},
|
|
"value": 1.0,
|
|
"raw": "1"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 86,
|
|
"end": 105,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 93,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 95,
|
|
"end": 99,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prop",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 101,
|
|
"end": 102,
|
|
"ctxt": 0
|
|
},
|
|
"value": 2.0,
|
|
"raw": "2"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 108,
|
|
"end": 125,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 108,
|
|
"end": 124,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 108,
|
|
"end": 118,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 108,
|
|
"end": 113,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 108,
|
|
"end": 111,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 114,
|
|
"end": 118,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prop",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 123,
|
|
"end": 124,
|
|
"ctxt": 0
|
|
},
|
|
"value": 2.0,
|
|
"raw": "2"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 126,
|
|
"end": 157,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 156,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"value": "result0",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 156,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 150,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 145,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 143,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 146,
|
|
"end": 150,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prop",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 155,
|
|
"end": 156,
|
|
"ctxt": 0
|
|
},
|
|
"value": 2.0,
|
|
"raw": "2"
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 158,
|
|
"end": 190,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 158,
|
|
"end": 189,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 158,
|
|
"end": 168,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 158,
|
|
"end": 163,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 158,
|
|
"end": 161,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 164,
|
|
"end": 168,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prop",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 173,
|
|
"end": 189,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 173,
|
|
"end": 183,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 173,
|
|
"end": 178,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 173,
|
|
"end": 176,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 179,
|
|
"end": 183,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prop",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 188,
|
|
"end": 189,
|
|
"ctxt": 0
|
|
},
|
|
"value": 2.0,
|
|
"raw": "2"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 191,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 195,
|
|
"end": 236,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 195,
|
|
"end": 202,
|
|
"ctxt": 0
|
|
},
|
|
"value": "result1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 236,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 215,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 210,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 208,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 211,
|
|
"end": 215,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prop",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 220,
|
|
"end": 236,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 220,
|
|
"end": 230,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 220,
|
|
"end": 225,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 220,
|
|
"end": 223,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 226,
|
|
"end": 230,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prop",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 235,
|
|
"end": 236,
|
|
"ctxt": 0
|
|
},
|
|
"value": 2.0,
|
|
"raw": "2"
|
|
}
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 238,
|
|
"end": 269,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 238,
|
|
"end": 268,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 238,
|
|
"end": 248,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 238,
|
|
"end": 243,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 238,
|
|
"end": 241,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 244,
|
|
"end": 248,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prop",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 253,
|
|
"end": 268,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 253,
|
|
"end": 263,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 253,
|
|
"end": 258,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 253,
|
|
"end": 256,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 259,
|
|
"end": 263,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prop",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 267,
|
|
"end": 268,
|
|
"ctxt": 0
|
|
},
|
|
"value": 2.0,
|
|
"raw": "2"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 270,
|
|
"end": 315,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 274,
|
|
"end": 314,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 274,
|
|
"end": 281,
|
|
"ctxt": 0
|
|
},
|
|
"value": "result2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 284,
|
|
"end": 314,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 284,
|
|
"end": 294,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 284,
|
|
"end": 289,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 284,
|
|
"end": 287,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 290,
|
|
"end": 294,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prop",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 299,
|
|
"end": 314,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 299,
|
|
"end": 309,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 299,
|
|
"end": 304,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 299,
|
|
"end": 302,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 305,
|
|
"end": 309,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prop",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 313,
|
|
"end": 314,
|
|
"ctxt": 0
|
|
},
|
|
"value": 2.0,
|
|
"raw": "2"
|
|
}
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|