mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 18:28:13 +03:00
426 lines
10 KiB
JSON
426 lines
10 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 41,
|
|
"end": 253,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 41,
|
|
"end": 63,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": true,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 53,
|
|
"end": 62,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 53,
|
|
"end": 54,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 54,
|
|
"end": 62,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 62,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 64,
|
|
"end": 95,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": true,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 76,
|
|
"end": 94,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 76,
|
|
"end": 77,
|
|
"ctxt": 0
|
|
},
|
|
"value": "p",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 77,
|
|
"end": 94,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 79,
|
|
"end": 94,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 79,
|
|
"end": 86,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Promise",
|
|
"optional": false
|
|
},
|
|
"typeParams": {
|
|
"type": "TsTypeParameterInstantiation",
|
|
"span": {
|
|
"start": 86,
|
|
"end": 94,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 87,
|
|
"end": 93,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 113,
|
|
"end": 119,
|
|
"ctxt": 0
|
|
},
|
|
"value": "before",
|
|
"optional": false
|
|
},
|
|
"declare": true,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 96,
|
|
"end": 128,
|
|
"ctxt": 0
|
|
},
|
|
"body": null,
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 121,
|
|
"end": 127,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 123,
|
|
"end": 127,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "void"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 146,
|
|
"end": 151,
|
|
"ctxt": 0
|
|
},
|
|
"value": "after",
|
|
"optional": false
|
|
},
|
|
"declare": true,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 129,
|
|
"end": 160,
|
|
"ctxt": 0
|
|
},
|
|
"body": null,
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 153,
|
|
"end": 159,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 155,
|
|
"end": 159,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "void"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 176,
|
|
"end": 180,
|
|
"ctxt": 0
|
|
},
|
|
"value": "func",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 161,
|
|
"end": 253,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 198,
|
|
"end": 253,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 204,
|
|
"end": 213,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 204,
|
|
"end": 212,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 204,
|
|
"end": 210,
|
|
"ctxt": 0
|
|
},
|
|
"value": "before",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 218,
|
|
"end": 238,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 222,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 222,
|
|
"end": 223,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 226,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "+",
|
|
"left": {
|
|
"type": "AwaitExpression",
|
|
"span": {
|
|
"start": 226,
|
|
"end": 233,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 232,
|
|
"end": 233,
|
|
"ctxt": 0
|
|
},
|
|
"value": "p",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 236,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 243,
|
|
"end": 251,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 243,
|
|
"end": 250,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 243,
|
|
"end": 248,
|
|
"ctxt": 0
|
|
},
|
|
"value": "after",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": true,
|
|
"typeParameters": null,
|
|
"returnType": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 182,
|
|
"end": 197,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 184,
|
|
"end": 197,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 184,
|
|
"end": 191,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Promise",
|
|
"optional": false
|
|
},
|
|
"typeParams": {
|
|
"type": "TsTypeParameterInstantiation",
|
|
"span": {
|
|
"start": 191,
|
|
"end": 197,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 192,
|
|
"end": 196,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "void"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|