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

186 lines
4.1 KiB
JSON

{
"type": "Module",
"span": {
"start": 47,
"end": 144,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 47,
"end": 68,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 54,
"end": 68,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 58,
"end": 67,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 59,
"end": 67,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 61,
"end": 67,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 93,
"end": 124,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 100,
"end": 103,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 106,
"end": 123,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 114,
"end": 122,
"ctxt": 0
},
"value": "vs/foo",
"raw": "\"vs/foo\""
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 125,
"end": 144,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 129,
"end": 143,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 133,
"end": 143,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "MemberExpression",
"span": {
"start": 133,
"end": 138,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 133,
"end": 136,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 137,
"end": 138,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 141,
"end": 143,
"ctxt": 0
},
"value": 10.0
}
},
"definite": false
}
]
}
],
"interpreter": null
}