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

234 lines
5.1 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 74,
"end": 201,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 74,
"end": 107,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 74,
"end": 107,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 74,
"end": 88,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 74,
"end": 80,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 81,
"end": 88,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "FunctionExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 100,
"end": 101,
"ctxt": 0
},
"value": "x",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 91,
"end": 107,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 104,
"end": 107,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 108,
"end": 124,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 108,
"end": 124,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 108,
"end": 122,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 108,
"end": 114,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 115,
"end": 122,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 169,
"end": 195,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 173,
"end": 195,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 173,
"end": 176,
"ctxt": 0
},
"value": "mod",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 179,
"end": 195,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 179,
"end": 186,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 187,
"end": 194,
"ctxt": 0
},
"value": "./mod",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 196,
"end": 201,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 196,
"end": 201,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 196,
"end": 199,
"ctxt": 0
},
"value": "mod",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}