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

180 lines
3.9 KiB
JSON

{
"type": "Module",
"span": {
"start": 50,
"end": 154,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 50,
"end": 70,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 57,
"end": 70,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 61,
"end": 69,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 61,
"end": 64,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 67,
"end": 69,
"ctxt": 0
},
"value": 42.0,
"raw": "42"
},
"definite": false
}
]
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 95,
"end": 132,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 102,
"end": 105,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 108,
"end": 131,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 116,
"end": 130,
"ctxt": 0
},
"value": "./test/foo_0",
"raw": "'./test/foo_0'"
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 133,
"end": 154,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 137,
"end": 153,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 137,
"end": 138,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 141,
"end": 153,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "MemberExpression",
"span": {
"start": 141,
"end": 148,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 145,
"end": 148,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 151,
"end": 153,
"ctxt": 0
},
"value": 42.0,
"raw": "42"
}
},
"definite": false
}
]
}
],
"interpreter": null
}