mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 11:13:43 +03:00
734 lines
17 KiB
JSON
734 lines
17 KiB
JSON
{
|
|
"type": "Module",
|
|
"span": {
|
|
"start": 101,
|
|
"end": 387,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 107,
|
|
"end": 112,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Alias",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 101,
|
|
"end": 139,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassMethod",
|
|
"span": {
|
|
"start": 119,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 119,
|
|
"end": 122,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bar",
|
|
"optional": false
|
|
},
|
|
"function": {
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 119,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 125,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 127,
|
|
"end": 135,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 134,
|
|
"end": 135,
|
|
"ctxt": 0
|
|
},
|
|
"value": 1.0,
|
|
"raw": "1"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"kind": "method",
|
|
"isStatic": false,
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 163,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 162,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 154,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 146,
|
|
"ctxt": 0
|
|
},
|
|
"value": "module",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 147,
|
|
"end": 154,
|
|
"ctxt": 0
|
|
},
|
|
"value": "exports",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 157,
|
|
"end": 162,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Alias",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ImportDeclaration",
|
|
"span": {
|
|
"start": 187,
|
|
"end": 209,
|
|
"ctxt": 0
|
|
},
|
|
"specifiers": [
|
|
{
|
|
"type": "ImportDefaultSpecifier",
|
|
"span": {
|
|
"start": 194,
|
|
"end": 195,
|
|
"ctxt": 0
|
|
},
|
|
"local": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 194,
|
|
"end": 195,
|
|
"ctxt": 0
|
|
},
|
|
"value": "A",
|
|
"optional": false
|
|
}
|
|
}
|
|
],
|
|
"source": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 201,
|
|
"end": 209,
|
|
"ctxt": 0
|
|
},
|
|
"value": "./mod1",
|
|
"raw": "'./mod1'"
|
|
},
|
|
"typeOnly": false,
|
|
"asserts": null
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 210,
|
|
"end": 229,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 210,
|
|
"end": 229,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 210,
|
|
"end": 225,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 210,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 210,
|
|
"end": 211,
|
|
"ctxt": 0
|
|
},
|
|
"value": "A",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 212,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prototype",
|
|
"optional": false
|
|
}
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 222,
|
|
"end": 225,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 228,
|
|
"end": 229,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 230,
|
|
"end": 279,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 230,
|
|
"end": 279,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 230,
|
|
"end": 246,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 230,
|
|
"end": 241,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 230,
|
|
"end": 231,
|
|
"ctxt": 0
|
|
},
|
|
"value": "A",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 232,
|
|
"end": 241,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prototype",
|
|
"optional": false
|
|
}
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 242,
|
|
"end": 246,
|
|
"ctxt": 0
|
|
},
|
|
"value": "func",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "FunctionExpression",
|
|
"identifier": null,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 249,
|
|
"end": 279,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 260,
|
|
"end": 279,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 262,
|
|
"end": 277,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 262,
|
|
"end": 276,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 262,
|
|
"end": 272,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "ThisExpression",
|
|
"span": {
|
|
"start": 262,
|
|
"end": 266,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 267,
|
|
"end": 272,
|
|
"ctxt": 0
|
|
},
|
|
"value": "_func",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 275,
|
|
"end": 276,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 280,
|
|
"end": 336,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 280,
|
|
"end": 335,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 280,
|
|
"end": 301,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 280,
|
|
"end": 286,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Object",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 287,
|
|
"end": 301,
|
|
"ctxt": 0
|
|
},
|
|
"value": "defineProperty",
|
|
"optional": false
|
|
}
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 302,
|
|
"end": 313,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 302,
|
|
"end": 303,
|
|
"ctxt": 0
|
|
},
|
|
"value": "A",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 304,
|
|
"end": 313,
|
|
"ctxt": 0
|
|
},
|
|
"value": "prototype",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 315,
|
|
"end": 320,
|
|
"ctxt": 0
|
|
},
|
|
"value": "def",
|
|
"raw": "\"def\""
|
|
}
|
|
},
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 322,
|
|
"end": 334,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 324,
|
|
"end": 329,
|
|
"ctxt": 0
|
|
},
|
|
"value": "value",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 331,
|
|
"end": 332,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 337,
|
|
"end": 348,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 337,
|
|
"end": 348,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 337,
|
|
"end": 344,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 341,
|
|
"end": 342,
|
|
"ctxt": 0
|
|
},
|
|
"value": "A",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 345,
|
|
"end": 348,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bar",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 349,
|
|
"end": 360,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 349,
|
|
"end": 360,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 349,
|
|
"end": 356,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 353,
|
|
"end": 354,
|
|
"ctxt": 0
|
|
},
|
|
"value": "A",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 357,
|
|
"end": 360,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 361,
|
|
"end": 375,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 361,
|
|
"end": 375,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 361,
|
|
"end": 373,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 361,
|
|
"end": 368,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 365,
|
|
"end": 366,
|
|
"ctxt": 0
|
|
},
|
|
"value": "A",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 369,
|
|
"end": 373,
|
|
"ctxt": 0
|
|
},
|
|
"value": "func",
|
|
"optional": false
|
|
}
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 376,
|
|
"end": 387,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 376,
|
|
"end": 387,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 376,
|
|
"end": 383,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 380,
|
|
"end": 381,
|
|
"ctxt": 0
|
|
},
|
|
"value": "A",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 384,
|
|
"end": 387,
|
|
"ctxt": 0
|
|
},
|
|
"value": "def",
|
|
"optional": false
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|