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

147 lines
3.0 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 52,
"ctxt": 0
},
"body": [
{
"type": "TsEnumDeclaration",
"span": {
"start": 1,
"end": 52,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"value": "E",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 14,
"end": 19,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 14,
"end": 15,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 18,
"end": 19,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"type": "TsEnumMember",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 32,
"end": 42,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 32,
"end": 33,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 36,
"end": 42,
"ctxt": 0
},
"operator": "<<",
"left": {
"type": "NumericLiteral",
"span": {
"start": 36,
"end": 37,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 41,
"end": 42,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
},
{
"type": "TsEnumMember",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"value": "D",
"optional": false
},
"init": null
}
]
}
],
"interpreter": null
}