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

427 lines
11 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 264,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 22,
"end": 36,
"ctxt": 0
},
"value": "SymbolIterator",
"optional": false
},
"declare": false,
"span": {
"start": 16,
"end": 194,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 43,
"end": 138,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 43,
"end": 47,
"ctxt": 0
},
"value": "next",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 43,
"end": 138,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 50,
"end": 138,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 60,
"end": 132,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 67,
"end": 131,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 81,
"end": 86,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 88,
"end": 96,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 88,
"end": 94,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 110,
"end": 114,
"ctxt": 0
},
"value": "done",
"optional": false
},
"value": {
"type": "BooleanLiteral",
"span": {
"start": 116,
"end": 121,
"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": 144,
"end": 192,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 144,
"end": 161,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 145,
"end": 160,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 145,
"end": 151,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 152,
"end": 160,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 144,
"end": 192,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 164,
"end": 192,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 174,
"end": 186,
"ctxt": 0
},
"argument": {
"type": "ThisExpression",
"span": {
"start": 181,
"end": 185,
"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": "VariableDeclaration",
"span": {
"start": 196,
"end": 225,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 200,
"end": 224,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 200,
"end": 205,
"ctxt": 0
},
"value": "array",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 205,
"end": 215,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 207,
"end": 215,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 207,
"end": 213,
"ctxt": 0
},
"kind": "number"
}
}
}
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 218,
"end": 224,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 219,
"end": 220,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 222,
"end": 223,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 226,
"end": 264,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 226,
"end": 263,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 226,
"end": 238,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 226,
"end": 231,
"ctxt": 0
},
"value": "array",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 232,
"end": 238,
"ctxt": 0
},
"value": "concat",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 239,
"end": 262,
"ctxt": 0
},
"elements": [
{
"spread": {
"start": 240,
"end": 243,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 243,
"end": 261,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 247,
"end": 261,
"ctxt": 0
},
"value": "SymbolIterator",
"optional": false
},
"arguments": null,
"typeArguments": null
}
}
]
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}