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

120 lines
3.0 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 64,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 28,
"end": 31,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 17,
"end": 64,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 34,
"end": 64,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 38,
"end": 62,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 42,
"end": 62,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 46,
"end": 62,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Computed",
"span": {
"start": 48,
"end": 55,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 49,
"end": 54,
"ctxt": 0
},
"argument": null,
"delegate": false
}
},
"value": {
"type": "Identifier",
"span": {
"start": 57,
"end": 60,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
]
},
"definite": false
}
]
}
]
},
"generator": true,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}