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

244 lines
5.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 15,
"end": 146,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 21,
"end": 35,
"ctxt": 0
},
"value": "StringIterator",
"optional": false
},
"declare": false,
"span": {
"start": 15,
"end": 107,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 42,
"end": 52,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 42,
"end": 46,
"ctxt": 0
},
"value": "next",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 46,
"end": 51,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 48,
"end": 51,
"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": 57,
"end": 105,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 57,
"end": 74,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 58,
"end": 73,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 58,
"end": 64,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 65,
"end": 73,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 57,
"end": 105,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 77,
"end": 105,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 87,
"end": 99,
"ctxt": 0
},
"argument": {
"type": "ThisExpression",
"span": {
"start": 94,
"end": 98,
"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": 109,
"end": 146,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 114,
"end": 119,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 118,
"end": 119,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 118,
"end": 119,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "NewExpression",
"span": {
"start": 123,
"end": 141,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 127,
"end": 141,
"ctxt": 0
},
"value": "StringIterator",
"optional": false
},
"arguments": null,
"typeArguments": null
},
"body": {
"type": "BlockStatement",
"span": {
"start": 143,
"end": 146,
"ctxt": 0
},
"stmts": []
}
}
],
"interpreter": null
}