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

211 lines
5.8 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 15,
"end": 114,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 15,
"end": 114,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 19,
"end": 114,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 19,
"end": 20,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 23,
"end": 114,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Computed",
"span": {
"start": 29,
"end": 39,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 30,
"end": 38,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 30,
"end": 36,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 41,
"end": 42,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
},
{
"type": "MethodProperty",
"key": {
"type": "Computed",
"span": {
"start": 48,
"end": 58,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 49,
"end": 57,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 49,
"end": 55,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
"params": [],
"decorators": [],
"span": {
"start": 48,
"end": 64,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 61,
"end": 64,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "GetterProperty",
"span": {
"start": 70,
"end": 112,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 74,
"end": 84,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 75,
"end": 83,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 75,
"end": 81,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
"typeAnnotation": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 87,
"end": 112,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 97,
"end": 106,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}