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

161 lines
3.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 59,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 0,
"end": 59,
"ctxt": 0
},
"expression": {
"type": "TemplateLiteral",
"span": {
"start": 0,
"end": 59,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 14,
"end": 16,
"ctxt": 0
},
"value": 10.0
},
{
"type": "NumericLiteral",
"span": {
"start": 39,
"end": 41,
"ctxt": 0
},
"value": 20.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 1,
"end": 11,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 1,
"end": 11,
"ctxt": 0
},
"value": " /**head ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 1,
"end": 11,
"ctxt": 0
},
"value": " /**head ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
},
{
"type": "TemplateElement",
"span": {
"start": 18,
"end": 36,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 18,
"end": 36,
"ctxt": 0
},
"value": " // still middle ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 18,
"end": 36,
"ctxt": 0
},
"value": " // still middle ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
},
{
"type": "TemplateElement",
"span": {
"start": 43,
"end": 58,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 43,
"end": 58,
"ctxt": 0
},
"value": " /* still tail ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 43,
"end": 58,
"ctxt": 0
},
"value": " /* still tail ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
}
}
],
"interpreter": null
}