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

383 lines
9.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 253,
"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": 40,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 29,
"end": 40,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 30,
"end": 40,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 32,
"end": 40,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 32,
"end": 38,
"ctxt": 0
},
"kind": "symbol"
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 16,
"end": 45,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 42,
"end": 45,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 52,
"end": 66,
"ctxt": 0
},
"value": "SymbolIterator",
"optional": false
},
"declare": false,
"span": {
"start": 46,
"end": 224,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 73,
"end": 168,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 73,
"end": 77,
"ctxt": 0
},
"value": "next",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 73,
"end": 168,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 80,
"end": 168,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 90,
"end": 162,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 97,
"end": 161,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 111,
"end": 116,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 118,
"end": 126,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 118,
"end": 124,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 140,
"end": 144,
"ctxt": 0
},
"value": "done",
"optional": false
},
"value": {
"type": "BooleanLiteral",
"span": {
"start": 146,
"end": 151,
"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": 174,
"end": 222,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 174,
"end": 191,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 175,
"end": 190,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 175,
"end": 181,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 182,
"end": 190,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 174,
"end": 222,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 194,
"end": 222,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 204,
"end": 216,
"ctxt": 0
},
"argument": {
"type": "ThisExpression",
"span": {
"start": 211,
"end": 215,
"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": 226,
"end": 253,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 226,
"end": 252,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 226,
"end": 229,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": {
"start": 230,
"end": 233,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 233,
"end": 251,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 237,
"end": 251,
"ctxt": 0
},
"value": "SymbolIterator",
"optional": false
},
"arguments": null,
"typeArguments": null
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}