swc/crates/swc_ecma_parser/tests/tsc/templateStringWithCommentsInArrowFunction.json
2022-04-05 12:46:35 +00:00

232 lines
5.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 27,
"end": 145,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 27,
"end": 39,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 33,
"end": 38,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 33,
"end": 34,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 40,
"end": 92,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 46,
"end": 91,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 46,
"end": 48,
"ctxt": 0
},
"value": "f1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 51,
"end": 91,
"ctxt": 0
},
"params": [],
"body": {
"type": "TemplateLiteral",
"span": {
"start": 61,
"end": 91,
"ctxt": 0
},
"expressions": [
{
"type": "Identifier",
"span": {
"start": 82,
"end": 83,
"ctxt": 0
},
"value": "a",
"optional": false
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 62,
"end": 62,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 89,
"end": 90,
"ctxt": 0
},
"tail": true,
"cooked": "a",
"raw": "a"
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 94,
"end": 145,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 100,
"end": 144,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 100,
"end": 102,
"ctxt": 0
},
"value": "f2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 105,
"end": 144,
"ctxt": 0
},
"params": [],
"body": {
"type": "TemplateLiteral",
"span": {
"start": 115,
"end": 144,
"ctxt": 0
},
"expressions": [
{
"type": "Identifier",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"value": "a",
"optional": false
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 116,
"end": 116,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 143,
"end": 143,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
}
],
"interpreter": null
}