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

276 lines
6.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 98,
"end": 198,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 98,
"end": 129,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 98,
"end": 129,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"value": "x",
"optional": false
},
"consequent": {
"type": "ArrowFunctionExpression",
"span": {
"start": 102,
"end": 114,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 102,
"end": 103,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "ParenthesisExpression",
"span": {
"start": 107,
"end": 114,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 108,
"end": 113,
"ctxt": 0
},
"properties": [
{
"type": "Identifier",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"value": "y",
"optional": false
}
]
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"alternate": {
"type": "ArrowFunctionExpression",
"span": {
"start": 117,
"end": 129,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 117,
"end": 118,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "ParenthesisExpression",
"span": {
"start": 122,
"end": 129,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 123,
"end": 128,
"ctxt": 0
},
"properties": [
{
"type": "Identifier",
"span": {
"start": 125,
"end": 126,
"ctxt": 0
},
"value": "z",
"optional": false
}
]
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 167,
"end": 198,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 167,
"end": 198,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 167,
"end": 168,
"ctxt": 0
},
"value": "x",
"optional": false
},
"consequent": {
"type": "ArrowFunctionExpression",
"span": {
"start": 171,
"end": 183,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 171,
"end": 172,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "ParenthesisExpression",
"span": {
"start": 176,
"end": 183,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 177,
"end": 182,
"ctxt": 0
},
"properties": [
{
"type": "Identifier",
"span": {
"start": 179,
"end": 180,
"ctxt": 0
},
"value": "y",
"optional": false
}
]
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"alternate": {
"type": "ArrowFunctionExpression",
"span": {
"start": 186,
"end": 198,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 186,
"end": 187,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "ParenthesisExpression",
"span": {
"start": 191,
"end": 198,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 192,
"end": 197,
"ctxt": 0
},
"properties": [
{
"type": "Identifier",
"span": {
"start": 194,
"end": 195,
"ctxt": 0
},
"value": "z",
"optional": false
}
]
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
}
],
"interpreter": null
}