mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 11:13:43 +03:00
476 lines
12 KiB
JSON
476 lines
12 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 277,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 25,
|
|
"end": 28,
|
|
"ctxt": 0
|
|
},
|
|
"value": "fun",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 29,
|
|
"end": 53,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "AssignmentPattern",
|
|
"span": {
|
|
"start": 29,
|
|
"end": 53,
|
|
"ctxt": 0
|
|
},
|
|
"left": {
|
|
"type": "ArrayPattern",
|
|
"span": {
|
|
"start": 29,
|
|
"end": 35,
|
|
"ctxt": 0
|
|
},
|
|
"elements": [
|
|
{
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 30,
|
|
"end": 31,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
{
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 33,
|
|
"end": 34,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 38,
|
|
"end": 53,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 42,
|
|
"end": 53,
|
|
"ctxt": 0
|
|
},
|
|
"value": "FooIterator",
|
|
"optional": false
|
|
},
|
|
"arguments": null,
|
|
"typeArguments": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 16,
|
|
"end": 58,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 55,
|
|
"end": 58,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 65,
|
|
"end": 68,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Bar",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 59,
|
|
"end": 74,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 71,
|
|
"end": 72,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 71,
|
|
"end": 72,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": null,
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 81,
|
|
"end": 84,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Foo",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 75,
|
|
"end": 102,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 99,
|
|
"end": 100,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 99,
|
|
"end": 100,
|
|
"ctxt": 0
|
|
},
|
|
"value": "y",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": null,
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
}
|
|
],
|
|
"superClass": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 93,
|
|
"end": 96,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Bar",
|
|
"optional": false
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 109,
|
|
"end": 120,
|
|
"ctxt": 0
|
|
},
|
|
"value": "FooIterator",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 103,
|
|
"end": 277,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassMethod",
|
|
"span": {
|
|
"start": 127,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 127,
|
|
"end": 131,
|
|
"ctxt": 0
|
|
},
|
|
"value": "next",
|
|
"optional": false
|
|
},
|
|
"function": {
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 127,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 134,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 144,
|
|
"end": 215,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 151,
|
|
"end": 214,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 165,
|
|
"end": 170,
|
|
"ctxt": 0
|
|
},
|
|
"value": "value",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 172,
|
|
"end": 179,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 176,
|
|
"end": 179,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Foo",
|
|
"optional": false
|
|
},
|
|
"arguments": null,
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 193,
|
|
"end": 197,
|
|
"ctxt": 0
|
|
},
|
|
"value": "done",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 199,
|
|
"end": 204,
|
|
"ctxt": 0
|
|
},
|
|
"value": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"kind": "method",
|
|
"isStatic": false,
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false
|
|
},
|
|
{
|
|
"type": "ClassMethod",
|
|
"span": {
|
|
"start": 227,
|
|
"end": 275,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 227,
|
|
"end": 244,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 228,
|
|
"end": 243,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 228,
|
|
"end": 234,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 235,
|
|
"end": 243,
|
|
"ctxt": 0
|
|
},
|
|
"value": "iterator",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
"function": {
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 227,
|
|
"end": 275,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 247,
|
|
"end": 275,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 257,
|
|
"end": 269,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "ThisExpression",
|
|
"span": {
|
|
"start": 264,
|
|
"end": 268,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"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": []
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|