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

130 lines
3.3 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 16,
"end": 62,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 16,
"end": 62,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 20,
"end": 62,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 24,
"end": 62,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "TemplateLiteral",
"span": {
"start": 33,
"end": 60,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 40,
"end": 43,
"ctxt": 0
},
"value": 123.0
},
{
"type": "NumericLiteral",
"span": {
"start": 51,
"end": 54,
"ctxt": 0
},
"value": 456.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 34,
"end": 37,
"ctxt": 0
},
"tail": false,
"cooked": "abc",
"raw": "abc"
},
{
"type": "TemplateElement",
"span": {
"start": 45,
"end": 48,
"ctxt": 0
},
"tail": false,
"cooked": "def",
"raw": "def"
},
{
"type": "TemplateElement",
"span": {
"start": 56,
"end": 59,
"ctxt": 0
},
"tail": true,
"cooked": "ghi",
"raw": "ghi"
}
]
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}