mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 02:29:04 +03:00
433 lines
11 KiB
JSON
433 lines
11 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 268,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 25,
|
|
"end": 28,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 29,
|
|
"end": 39,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 29,
|
|
"end": 39,
|
|
"ctxt": 0
|
|
},
|
|
"value": "s1",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 31,
|
|
"end": 39,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 33,
|
|
"end": 39,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "symbol"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 41,
|
|
"end": 55,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 41,
|
|
"end": 55,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 41,
|
|
"end": 44,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 44,
|
|
"end": 45,
|
|
"ctxt": 0
|
|
},
|
|
"value": "s",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 45,
|
|
"end": 55,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsArrayType",
|
|
"span": {
|
|
"start": 47,
|
|
"end": 55,
|
|
"ctxt": 0
|
|
},
|
|
"elemType": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 47,
|
|
"end": 53,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "symbol"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 16,
|
|
"end": 60,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 57,
|
|
"end": 60,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 67,
|
|
"end": 81,
|
|
"ctxt": 0
|
|
},
|
|
"value": "SymbolIterator",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 61,
|
|
"end": 239,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassMethod",
|
|
"span": {
|
|
"start": 88,
|
|
"end": 183,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 88,
|
|
"end": 92,
|
|
"ctxt": 0
|
|
},
|
|
"value": "next",
|
|
"optional": false
|
|
},
|
|
"function": {
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 88,
|
|
"end": 183,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 95,
|
|
"end": 183,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 105,
|
|
"end": 177,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 112,
|
|
"end": 176,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 126,
|
|
"end": 131,
|
|
"ctxt": 0
|
|
},
|
|
"value": "value",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 133,
|
|
"end": 141,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 133,
|
|
"end": 139,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 155,
|
|
"end": 159,
|
|
"ctxt": 0
|
|
},
|
|
"value": "done",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 161,
|
|
"end": 166,
|
|
"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": 189,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 189,
|
|
"end": 206,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 190,
|
|
"end": 205,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 190,
|
|
"end": 196,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 197,
|
|
"end": 205,
|
|
"ctxt": 0
|
|
},
|
|
"value": "iterator",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
"function": {
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 189,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 209,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 219,
|
|
"end": 231,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "ThisExpression",
|
|
"span": {
|
|
"start": 226,
|
|
"end": 230,
|
|
"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": []
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 241,
|
|
"end": 268,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 241,
|
|
"end": 267,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 241,
|
|
"end": 244,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": {
|
|
"start": 245,
|
|
"end": 248,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 248,
|
|
"end": 266,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 252,
|
|
"end": 266,
|
|
"ctxt": 0
|
|
},
|
|
"value": "SymbolIterator",
|
|
"optional": false
|
|
},
|
|
"arguments": null,
|
|
"typeArguments": null
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|