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

258 lines
5.8 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 133,
"end": 228,
"ctxt": 0
},
"body": [
{
"type": "TsEnumDeclaration",
"span": {
"start": 133,
"end": 228,
"ctxt": 0
},
"declare": true,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 146,
"end": 147,
"ctxt": 0
},
"value": "E",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 154,
"end": 160,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"value": "a",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 158,
"end": 160,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
}
},
{
"type": "TsEnumMember",
"span": {
"start": 166,
"end": 176,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"value": "b",
"optional": false
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 170,
"end": 176,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NumericLiteral",
"span": {
"start": 170,
"end": 172,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
},
{
"type": "TsEnumMember",
"span": {
"start": 182,
"end": 187,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 182,
"end": 183,
"ctxt": 0
},
"value": "c",
"optional": false
},
"init": {
"type": "Identifier",
"span": {
"start": 186,
"end": 187,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"type": "TsEnumMember",
"span": {
"start": 193,
"end": 204,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 193,
"end": 194,
"ctxt": 0
},
"value": "d",
"optional": false
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 197,
"end": 204,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "ParenthesisExpression",
"span": {
"start": 197,
"end": 200,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"value": "c",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
},
{
"type": "TsEnumMember",
"span": {
"start": 210,
"end": 225,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 210,
"end": 211,
"ctxt": 0
},
"value": "e",
"optional": false
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 214,
"end": 225,
"ctxt": 0
},
"operator": "<<",
"left": {
"type": "NumericLiteral",
"span": {
"start": 214,
"end": 216,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 220,
"end": 225,
"ctxt": 0
},
"operator": "*",
"left": {
"type": "NumericLiteral",
"span": {
"start": 220,
"end": 221,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 224,
"end": 225,
"ctxt": 0
},
"value": 8.0,
"raw": "8"
}
}
}
}
]
}
],
"interpreter": null
}