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

179 lines
4.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 34,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 16,
"end": 34,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 16,
"end": 33,
"ctxt": 0
},
"object": {
"type": "TemplateLiteral",
"span": {
"start": 16,
"end": 28,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"value": 0.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 17,
"end": 20,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 17,
"end": 20,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 17,
"end": 20,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
},
{
"type": "TemplateElement",
"span": {
"start": 24,
"end": 27,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 24,
"end": 27,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 24,
"end": 27,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
},
"property": {
"type": "Computed",
"span": {
"start": 28,
"end": 33,
"ctxt": 0
},
"expression": {
"type": "TemplateLiteral",
"span": {
"start": 29,
"end": 32,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"value": "0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"value": "0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
}
}
}
}
],
"interpreter": null
}