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

232 lines
5.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 28,
"end": 146,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 28,
"end": 40,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 34,
"end": 39,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 38,
"end": 39,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 41,
"end": 93,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 47,
"end": 92,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 47,
"end": 49,
"ctxt": 0
},
"value": "f1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 52,
"end": 92,
"ctxt": 0
},
"params": [],
"body": {
"type": "TemplateLiteral",
"span": {
"start": 62,
"end": 92,
"ctxt": 0
},
"expressions": [
{
"type": "Identifier",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"value": "a",
"optional": false
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 63,
"end": 63,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 90,
"end": 91,
"ctxt": 0
},
"tail": true,
"cooked": "a",
"raw": "a"
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 95,
"end": 146,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 101,
"end": 145,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 101,
"end": 103,
"ctxt": 0
},
"value": "f2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 106,
"end": 145,
"ctxt": 0
},
"params": [],
"body": {
"type": "TemplateLiteral",
"span": {
"start": 116,
"end": 145,
"ctxt": 0
},
"expressions": [
{
"type": "Identifier",
"span": {
"start": 137,
"end": 138,
"ctxt": 0
},
"value": "a",
"optional": false
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 117,
"end": 117,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 144,
"end": 144,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
}
],
"interpreter": null
}