mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
198 lines
4.3 KiB
JSON
198 lines
4.3 KiB
JSON
{
|
|
"type": "Module",
|
|
"span": {
|
|
"start": 39,
|
|
"end": 214,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsModuleDeclaration",
|
|
"span": {
|
|
"start": 39,
|
|
"end": 78,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"global": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 46,
|
|
"end": 49,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"body": {
|
|
"type": "TsModuleBlock",
|
|
"span": {
|
|
"start": 50,
|
|
"end": 78,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ExportDeclaration",
|
|
"span": {
|
|
"start": 53,
|
|
"end": 76,
|
|
"ctxt": 0
|
|
},
|
|
"declaration": {
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 60,
|
|
"end": 76,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 64,
|
|
"end": 75,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 64,
|
|
"end": 70,
|
|
"ctxt": 0
|
|
},
|
|
"value": "answer",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 73,
|
|
"end": 75,
|
|
"ctxt": 0
|
|
},
|
|
"value": 42.0
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "TsImportEqualsDeclaration",
|
|
"span": {
|
|
"start": 103,
|
|
"end": 135,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"isExport": false,
|
|
"isTypeOnly": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 110,
|
|
"end": 113,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"moduleRef": {
|
|
"type": "TsExternalModuleReference",
|
|
"span": {
|
|
"start": 116,
|
|
"end": 134,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 124,
|
|
"end": 133,
|
|
"ctxt": 0
|
|
},
|
|
"value": "./foo_0",
|
|
"hasEscape": false,
|
|
"kind": {
|
|
"type": "normal",
|
|
"containsQuote": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "IfStatement",
|
|
"span": {
|
|
"start": 189,
|
|
"end": 214,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 192,
|
|
"end": 209,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "===",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 192,
|
|
"end": 202,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 192,
|
|
"end": 195,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 196,
|
|
"end": 202,
|
|
"ctxt": 0
|
|
},
|
|
"value": "answer",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 207,
|
|
"end": 209,
|
|
"ctxt": 0
|
|
},
|
|
"value": 42.0
|
|
}
|
|
},
|
|
"consequent": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 210,
|
|
"end": 214,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"alternate": null
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|