swc/crates/swc_ecma_parser/tests/tsc/nameWithFileExtension.json
2022-03-22 07:54:08 +00:00

178 lines
3.9 KiB
JSON

{
"type": "Module",
"span": {
"start": 44,
"end": 146,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 44,
"end": 64,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 51,
"end": 64,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 55,
"end": 63,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 55,
"end": 58,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 61,
"end": 63,
"ctxt": 0
},
"value": 42.0
},
"definite": false
}
]
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 89,
"end": 124,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 96,
"end": 99,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 102,
"end": 123,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 110,
"end": 122,
"ctxt": 0
},
"value": "./foo_0.js",
"raw": "'./foo_0.js'"
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 125,
"end": 146,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 129,
"end": 145,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 133,
"end": 145,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "MemberExpression",
"span": {
"start": 133,
"end": 140,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 133,
"end": 136,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 137,
"end": 140,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 143,
"end": 145,
"ctxt": 0
},
"value": 42.0
}
},
"definite": false
}
]
}
],
"interpreter": null
}