swc/crates/swc_ecma_parser/tests/tsc/for-of28.json

244 lines
5.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 147,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 22,
"end": 36,
"ctxt": 0
},
"value": "StringIterator",
"optional": false
},
"declare": false,
"span": {
"start": 16,
"end": 108,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 43,
"end": 53,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 43,
"end": 47,
"ctxt": 0
},
"value": "next",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 47,
"end": 52,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 49,
"end": 52,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 58,
"end": 106,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 58,
"end": 75,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 59,
"end": 74,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 59,
"end": 65,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 66,
"end": 74,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 58,
"end": 106,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 78,
"end": 106,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 88,
"end": 100,
"ctxt": 0
},
"argument": {
"type": "ThisExpression",
"span": {
"start": 95,
"end": 99,
"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": "ForOfStatement",
"span": {
"start": 110,
"end": 147,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 115,
"end": 120,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "NewExpression",
"span": {
"start": 124,
"end": 142,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 128,
"end": 142,
"ctxt": 0
},
"value": "StringIterator",
"optional": false
},
"arguments": null,
"typeArguments": null
},
"body": {
"type": "BlockStatement",
"span": {
"start": 144,
"end": 147,
"ctxt": 0
},
"stmts": []
}
}
],
"interpreter": null
}