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

121 lines
2.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 58,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 16,
"end": 58,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 28,
"end": 56,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 29,
"end": 32,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 28,
"end": 56,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 35,
"end": 56,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 41,
"end": 52,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 41,
"end": 51,
"ctxt": 0
},
"argument": {
"type": "ParenthesisExpression",
"span": {
"start": 46,
"end": 51,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 47,
"end": 50,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"delegate": false
}
}
]
},
"generator": true,
"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": []
}
],
"interpreter": null
}