mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 11:13:43 +03:00
898 lines
27 KiB
JSON
898 lines
27 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 17,
|
|
"end": 451,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 17,
|
|
"end": 72,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 21,
|
|
"end": 72,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 21,
|
|
"end": 22,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "ArrowFunctionExpression",
|
|
"span": {
|
|
"start": 25,
|
|
"end": 72,
|
|
"ctxt": 0
|
|
},
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 31,
|
|
"end": 72,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 37,
|
|
"end": 60,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 41,
|
|
"end": 59,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 41,
|
|
"end": 44,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arg",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 47,
|
|
"end": 59,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 47,
|
|
"end": 56,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arguments",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 59,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 57,
|
|
"end": 58,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
}
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"async": false,
|
|
"generator": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 74,
|
|
"end": 165,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 78,
|
|
"end": 165,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 78,
|
|
"end": 79,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "FunctionExpression",
|
|
"identifier": null,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 82,
|
|
"end": 165,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 165,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 100,
|
|
"end": 163,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 104,
|
|
"end": 163,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 104,
|
|
"end": 105,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "ArrowFunctionExpression",
|
|
"span": {
|
|
"start": 108,
|
|
"end": 163,
|
|
"ctxt": 0
|
|
},
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 114,
|
|
"end": 163,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 124,
|
|
"end": 147,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 128,
|
|
"end": 146,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 128,
|
|
"end": 131,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arg",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 134,
|
|
"end": 146,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 134,
|
|
"end": 143,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arguments",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 143,
|
|
"end": 146,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 144,
|
|
"end": 145,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
}
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"async": false,
|
|
"generator": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 176,
|
|
"end": 179,
|
|
"ctxt": 0
|
|
},
|
|
"value": "baz",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 167,
|
|
"end": 223,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 182,
|
|
"end": 223,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 185,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "ArrowFunctionExpression",
|
|
"span": {
|
|
"start": 185,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 191,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 195,
|
|
"end": 218,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 199,
|
|
"end": 217,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 199,
|
|
"end": 202,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arg",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 217,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 214,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arguments",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 214,
|
|
"end": 217,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 215,
|
|
"end": 216,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
}
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"async": false,
|
|
"generator": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 234,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 238,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 238,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"value": "inputFunc",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 247,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsFunctionType",
|
|
"span": {
|
|
"start": 249,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"params": [],
|
|
"typeParams": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 252,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 255,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "void"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 225,
|
|
"end": 264,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 261,
|
|
"end": 264,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 265,
|
|
"end": 318,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 265,
|
|
"end": 317,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 265,
|
|
"end": 268,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "ArrowFunctionExpression",
|
|
"span": {
|
|
"start": 269,
|
|
"end": 316,
|
|
"ctxt": 0
|
|
},
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 275,
|
|
"end": 316,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 281,
|
|
"end": 304,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 285,
|
|
"end": 303,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 285,
|
|
"end": 288,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arg",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 291,
|
|
"end": 303,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 291,
|
|
"end": 300,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arguments",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 300,
|
|
"end": 303,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 301,
|
|
"end": 302,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
}
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"async": false,
|
|
"generator": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 329,
|
|
"end": 332,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bar",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 320,
|
|
"end": 379,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 335,
|
|
"end": 379,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 341,
|
|
"end": 364,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 345,
|
|
"end": 363,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 345,
|
|
"end": 348,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arg",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 351,
|
|
"end": 363,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 351,
|
|
"end": 360,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arguments",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 360,
|
|
"end": 363,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 361,
|
|
"end": 362,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
}
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 382,
|
|
"end": 451,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "ArrowFunctionExpression",
|
|
"span": {
|
|
"start": 382,
|
|
"end": 451,
|
|
"ctxt": 0
|
|
},
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 388,
|
|
"end": 451,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 400,
|
|
"end": 403,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 391,
|
|
"end": 449,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 406,
|
|
"end": 449,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 410,
|
|
"end": 433,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 414,
|
|
"end": 432,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 414,
|
|
"end": 417,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arg",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 420,
|
|
"end": 432,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 420,
|
|
"end": 429,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arguments",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 429,
|
|
"end": 432,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 430,
|
|
"end": 431,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
}
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
]
|
|
},
|
|
"async": false,
|
|
"generator": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|