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

170 lines
3.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 98,
"end": 168,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 98,
"end": 114,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 98,
"end": 114,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"value": "b",
"optional": false
},
"consequent": {
"type": "ParenthesisExpression",
"span": {
"start": 102,
"end": 105,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 103,
"end": 104,
"ctxt": 0
},
"value": "c",
"optional": false
}
},
"alternate": {
"type": "ArrowFunctionExpression",
"span": {
"start": 108,
"end": 114,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 108,
"end": 109,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "Identifier",
"span": {
"start": 113,
"end": 114,
"ctxt": 0
},
"value": "e",
"optional": false
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 152,
"end": 168,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 152,
"end": 168,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"value": "b",
"optional": false
},
"consequent": {
"type": "ParenthesisExpression",
"span": {
"start": 156,
"end": 159,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 157,
"end": 158,
"ctxt": 0
},
"value": "c",
"optional": false
}
},
"alternate": {
"type": "ArrowFunctionExpression",
"span": {
"start": 162,
"end": 168,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 162,
"end": 163,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "Identifier",
"span": {
"start": 167,
"end": 168,
"ctxt": 0
},
"value": "e",
"optional": false
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
}
],
"interpreter": null
}