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

181 lines
4.0 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 106,
"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": 67,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 42,
"end": 65,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 42,
"end": 59,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 43,
"end": 58,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 43,
"end": 49,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 50,
"end": 58,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 59,
"end": 64,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 61,
"end": 64,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ForOfStatement",
"span": {
"start": 69,
"end": 106,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 74,
"end": 79,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 78,
"end": 79,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 78,
"end": 79,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "NewExpression",
"span": {
"start": 83,
"end": 101,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 87,
"end": 101,
"ctxt": 0
},
"value": "StringIterator",
"optional": false
},
"arguments": null,
"typeArguments": null
},
"body": {
"type": "BlockStatement",
"span": {
"start": 103,
"end": 106,
"ctxt": 0
},
"stmts": []
}
}
],
"interpreter": null
}