mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 10:12:42 +03:00
484 lines
15 KiB
JSON
484 lines
15 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 20,
|
|
"end": 222,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 20,
|
|
"end": 37,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 26,
|
|
"end": 36,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 26,
|
|
"end": 31,
|
|
"ctxt": 0
|
|
},
|
|
"value": "array",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "ArrayExpression",
|
|
"span": {
|
|
"start": 34,
|
|
"end": 36,
|
|
"ctxt": 0
|
|
},
|
|
"elements": []
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ForStatement",
|
|
"span": {
|
|
"start": 38,
|
|
"end": 222,
|
|
"ctxt": 0
|
|
},
|
|
"init": {
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 43,
|
|
"end": 52,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 47,
|
|
"end": 52,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 47,
|
|
"end": 48,
|
|
"ctxt": 0
|
|
},
|
|
"value": "i",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 51,
|
|
"end": 52,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
"test": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 54,
|
|
"end": 60,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "<",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 54,
|
|
"end": 55,
|
|
"ctxt": 0
|
|
},
|
|
"value": "i",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 58,
|
|
"end": 60,
|
|
"ctxt": 0
|
|
},
|
|
"value": 10.0,
|
|
"raw": "10"
|
|
}
|
|
},
|
|
"update": {
|
|
"type": "UpdateExpression",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 65,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "++",
|
|
"prefix": true,
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 64,
|
|
"end": 65,
|
|
"ctxt": 0
|
|
},
|
|
"value": "i",
|
|
"optional": false
|
|
}
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 67,
|
|
"end": 222,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 73,
|
|
"end": 220,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 73,
|
|
"end": 219,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 73,
|
|
"end": 83,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 73,
|
|
"end": 78,
|
|
"ctxt": 0
|
|
},
|
|
"value": "array",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 79,
|
|
"end": 83,
|
|
"ctxt": 0
|
|
},
|
|
"value": "push",
|
|
"optional": false
|
|
}
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "ClassExpression",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 90,
|
|
"end": 91,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 84,
|
|
"end": 218,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "PrivateProperty",
|
|
"span": {
|
|
"start": 102,
|
|
"end": 121,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "PrivateName",
|
|
"span": {
|
|
"start": 102,
|
|
"end": 110,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 103,
|
|
"end": 110,
|
|
"ctxt": 0
|
|
},
|
|
"value": "myField",
|
|
"optional": false
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 113,
|
|
"end": 120,
|
|
"ctxt": 0
|
|
},
|
|
"value": "hello",
|
|
"raw": "\"hello\""
|
|
},
|
|
"typeAnnotation": null,
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"definite": false
|
|
},
|
|
{
|
|
"type": "PrivateMethod",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 142,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "PrivateName",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 131,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"value": "method",
|
|
"optional": false
|
|
}
|
|
},
|
|
"function": {
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 130,
|
|
"end": 142,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 142,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"kind": "method",
|
|
"isStatic": false,
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false
|
|
},
|
|
{
|
|
"type": "PrivateMethod",
|
|
"span": {
|
|
"start": 151,
|
|
"end": 181,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "PrivateName",
|
|
"span": {
|
|
"start": 155,
|
|
"end": 164,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 156,
|
|
"end": 164,
|
|
"ctxt": 0
|
|
},
|
|
"value": "accessor",
|
|
"optional": false
|
|
}
|
|
},
|
|
"function": {
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 151,
|
|
"end": 181,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 167,
|
|
"end": 181,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 169,
|
|
"end": 179,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 176,
|
|
"end": 178,
|
|
"ctxt": 0
|
|
},
|
|
"value": 42.0,
|
|
"raw": "42"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"kind": "getter",
|
|
"isStatic": false,
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false
|
|
},
|
|
{
|
|
"type": "PrivateMethod",
|
|
"span": {
|
|
"start": 190,
|
|
"end": 212,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "PrivateName",
|
|
"span": {
|
|
"start": 194,
|
|
"end": 203,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 195,
|
|
"end": 203,
|
|
"ctxt": 0
|
|
},
|
|
"value": "accessor",
|
|
"optional": false
|
|
}
|
|
},
|
|
"function": {
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 204,
|
|
"end": 207,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 204,
|
|
"end": 207,
|
|
"ctxt": 0
|
|
},
|
|
"value": "val",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 190,
|
|
"end": 212,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 209,
|
|
"end": 212,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"kind": "setter",
|
|
"isStatic": false,
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|