mirror of
https://github.com/swc-project/swc.git
synced 2024-12-11 07:35:15 +03:00
408 lines
9.5 KiB
JSON
408 lines
9.5 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 136,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 10,
|
|
"end": 14,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo1",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 15,
|
|
"end": 28,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "AssignmentPattern",
|
|
"span": {
|
|
"start": 15,
|
|
"end": 28,
|
|
"ctxt": 0
|
|
},
|
|
"left": {
|
|
"type": "ArrayPattern",
|
|
"span": {
|
|
"start": 15,
|
|
"end": 21,
|
|
"ctxt": 0
|
|
},
|
|
"elements": [
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 20,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 16,
|
|
"end": 19,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 19,
|
|
"end": 20,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 24,
|
|
"end": 28,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 1,
|
|
"end": 33,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 30,
|
|
"end": 33,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 44,
|
|
"end": 48,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo2",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 49,
|
|
"end": 67,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "AssignmentPattern",
|
|
"span": {
|
|
"start": 49,
|
|
"end": 67,
|
|
"ctxt": 0
|
|
},
|
|
"left": {
|
|
"type": "ArrayPattern",
|
|
"span": {
|
|
"start": 49,
|
|
"end": 55,
|
|
"ctxt": 0
|
|
},
|
|
"elements": [
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 50,
|
|
"end": 54,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 50,
|
|
"end": 53,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 53,
|
|
"end": 54,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 58,
|
|
"end": 67,
|
|
"ctxt": 0
|
|
},
|
|
"value": "undefined",
|
|
"optional": false
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 35,
|
|
"end": 72,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 69,
|
|
"end": 72,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 83,
|
|
"end": 87,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo3",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 88,
|
|
"end": 99,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "AssignmentPattern",
|
|
"span": {
|
|
"start": 88,
|
|
"end": 99,
|
|
"ctxt": 0
|
|
},
|
|
"left": {
|
|
"type": "ArrayPattern",
|
|
"span": {
|
|
"start": 88,
|
|
"end": 94,
|
|
"ctxt": 0
|
|
},
|
|
"elements": [
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 89,
|
|
"end": 93,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 89,
|
|
"end": 92,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 92,
|
|
"end": 93,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 97,
|
|
"end": 99,
|
|
"ctxt": 0
|
|
},
|
|
"properties": []
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 74,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 101,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 115,
|
|
"end": 119,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo4",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 120,
|
|
"end": 131,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "AssignmentPattern",
|
|
"span": {
|
|
"start": 120,
|
|
"end": 131,
|
|
"ctxt": 0
|
|
},
|
|
"left": {
|
|
"type": "ArrayPattern",
|
|
"span": {
|
|
"start": 120,
|
|
"end": 126,
|
|
"ctxt": 0
|
|
},
|
|
"elements": [
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 121,
|
|
"end": 125,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 121,
|
|
"end": 124,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 124,
|
|
"end": 125,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "ArrayExpression",
|
|
"span": {
|
|
"start": 129,
|
|
"end": 131,
|
|
"ctxt": 0
|
|
},
|
|
"elements": []
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 106,
|
|
"end": 136,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 133,
|
|
"end": 136,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|