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

121 lines
2.9 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 17,
"end": 59,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 17,
"end": 59,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 29,
"end": 57,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 30,
"end": 33,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 29,
"end": 57,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 36,
"end": 57,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 42,
"end": 53,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 42,
"end": 52,
"ctxt": 0
},
"argument": {
"type": "ParenthesisExpression",
"span": {
"start": 47,
"end": 52,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 48,
"end": 51,
"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
}