mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 10:12:42 +03:00
265 lines
7.7 KiB
JSON
265 lines
7.7 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 24,
|
|
"end": 145,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 24,
|
|
"end": 145,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 28,
|
|
"end": 144,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 28,
|
|
"end": 31,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 31,
|
|
"end": 44,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsFunctionType",
|
|
"span": {
|
|
"start": 33,
|
|
"end": 44,
|
|
"ctxt": 0
|
|
},
|
|
"params": [],
|
|
"typeParams": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 36,
|
|
"end": 44,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTupleType",
|
|
"span": {
|
|
"start": 39,
|
|
"end": 44,
|
|
"ctxt": 0
|
|
},
|
|
"elemTypes": [
|
|
{
|
|
"type": "TsTupleElement",
|
|
"span": {
|
|
"start": 40,
|
|
"end": 43,
|
|
"ctxt": 0
|
|
},
|
|
"label": null,
|
|
"ty": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 40,
|
|
"end": 43,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "any"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"init": {
|
|
"type": "FunctionExpression",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 59,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bar",
|
|
"optional": false
|
|
},
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 47,
|
|
"end": 144,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 144,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 68,
|
|
"end": 93,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 72,
|
|
"end": 92,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 72,
|
|
"end": 84,
|
|
"ctxt": 0
|
|
},
|
|
"value": "intermediate",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 87,
|
|
"end": 92,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 87,
|
|
"end": 90,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bar",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 98,
|
|
"end": 118,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 98,
|
|
"end": 117,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 98,
|
|
"end": 110,
|
|
"ctxt": 0
|
|
},
|
|
"value": "intermediate",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "ArrayExpression",
|
|
"span": {
|
|
"start": 113,
|
|
"end": 117,
|
|
"ctxt": 0
|
|
},
|
|
"elements": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 114,
|
|
"end": 116,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"raw": "\"\""
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 123,
|
|
"end": 142,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "ArrayExpression",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 141,
|
|
"ctxt": 0
|
|
},
|
|
"elements": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 131,
|
|
"end": 140,
|
|
"ctxt": 0
|
|
},
|
|
"value": "undefined",
|
|
"optional": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|