swc/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall2.json

383 lines
9.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 252,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 24,
"end": 27,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 28,
"end": 39,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 28,
"end": 39,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 29,
"end": 39,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 31,
"end": 39,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 31,
"end": 37,
"ctxt": 0
},
"kind": "symbol"
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 15,
"end": 44,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 41,
"end": 44,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 51,
"end": 65,
"ctxt": 0
},
"value": "SymbolIterator",
"optional": false
},
"declare": false,
"span": {
"start": 45,
"end": 223,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 72,
"end": 167,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 72,
"end": 76,
"ctxt": 0
},
"value": "next",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 72,
"end": 167,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 79,
"end": 167,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 89,
"end": 161,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 96,
"end": 160,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 110,
"end": 115,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 117,
"end": 125,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 117,
"end": 123,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 139,
"end": 143,
"ctxt": 0
},
"value": "done",
"optional": false
},
"value": {
"type": "BooleanLiteral",
"span": {
"start": 145,
"end": 150,
"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": 173,
"end": 221,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 173,
"end": 190,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 174,
"end": 189,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 174,
"end": 180,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 181,
"end": 189,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 173,
"end": 221,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 193,
"end": 221,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 203,
"end": 215,
"ctxt": 0
},
"argument": {
"type": "ThisExpression",
"span": {
"start": 210,
"end": 214,
"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": 225,
"end": 252,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 225,
"end": 251,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 225,
"end": 228,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": {
"start": 229,
"end": 232,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 232,
"end": 250,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 236,
"end": 250,
"ctxt": 0
},
"value": "SymbolIterator",
"optional": false
},
"arguments": null,
"typeArguments": null
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}