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

241 lines
6.2 KiB
JSON

{
"type": "Module",
"span": {
"start": 55,
"end": 295,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 55,
"end": 94,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 71,
"end": 74,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 62,
"end": 94,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 77,
"end": 94,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 79,
"end": 92,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 86,
"end": 91,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 187,
"end": 191,
"ctxt": 0
},
"value": "func",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 172,
"end": 295,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 194,
"end": 295,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 200,
"end": 224,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 206,
"end": 223,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 206,
"end": 217,
"ctxt": 0
},
"value": "packageName",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 220,
"end": 223,
"ctxt": 0
},
"value": ".",
"raw": "'.'"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 229,
"end": 293,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 235,
"end": 292,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 235,
"end": 246,
"ctxt": 0
},
"value": "packageJson",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 249,
"end": 292,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 255,
"end": 292,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 255,
"end": 261,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "BinaryExpression",
"span": {
"start": 262,
"end": 291,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "Identifier",
"span": {
"start": 262,
"end": 273,
"ctxt": 0
},
"value": "packageName",
"optional": false
},
"right": {
"type": "StringLiteral",
"span": {
"start": 276,
"end": 291,
"ctxt": 0
},
"value": "/package.json",
"raw": "'/package.json'"
}
}
}
],
"typeArguments": null
}
},
"definite": false
}
]
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}