mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 11:13:43 +03:00
392 lines
8.1 KiB
JSON
392 lines
8.1 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 233,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 11,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 5,
|
|
"end": 10,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 5,
|
|
"end": 6,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 6,
|
|
"end": 10,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 8,
|
|
"end": 10,
|
|
"ctxt": 0
|
|
},
|
|
"members": []
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 22,
|
|
"end": 25,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 13,
|
|
"end": 47,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 28,
|
|
"end": 47,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 34,
|
|
"end": 45,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 34,
|
|
"end": 44,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 34,
|
|
"end": 40,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "ThisExpression",
|
|
"span": {
|
|
"start": 34,
|
|
"end": 38,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 39,
|
|
"end": 40,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 43,
|
|
"end": 44,
|
|
"ctxt": 0
|
|
},
|
|
"value": 1.0,
|
|
"raw": "1"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 55,
|
|
"end": 57,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C1",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 49,
|
|
"end": 79,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [],
|
|
"superClass": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 66,
|
|
"end": 75,
|
|
"ctxt": 0
|
|
},
|
|
"value": "undefined",
|
|
"optional": false
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 86,
|
|
"end": 88,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C2",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 80,
|
|
"end": 105,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [],
|
|
"superClass": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 97,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"value": true
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 112,
|
|
"end": 114,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C3",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 106,
|
|
"end": 132,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [],
|
|
"superClass": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 123,
|
|
"end": 128,
|
|
"ctxt": 0
|
|
},
|
|
"value": false
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 139,
|
|
"end": 141,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C4",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 133,
|
|
"end": 156,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [],
|
|
"superClass": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 150,
|
|
"end": 152,
|
|
"ctxt": 0
|
|
},
|
|
"value": 42.0,
|
|
"raw": "42"
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 163,
|
|
"end": 165,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C5",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 157,
|
|
"end": 185,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [],
|
|
"superClass": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 174,
|
|
"end": 181,
|
|
"ctxt": 0
|
|
},
|
|
"value": "hello",
|
|
"raw": "\"hello\""
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 192,
|
|
"end": 194,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C6",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 186,
|
|
"end": 208,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [],
|
|
"superClass": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 203,
|
|
"end": 204,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 215,
|
|
"end": 217,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C7",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 209,
|
|
"end": 233,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [],
|
|
"superClass": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 226,
|
|
"end": 229,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|