mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 10:12:42 +03:00
396 lines
9.4 KiB
JSON
396 lines
9.4 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 136,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 41,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 20,
|
|
"end": 29,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 20,
|
|
"end": 21,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 21,
|
|
"end": 29,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 23,
|
|
"end": 29,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
},
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 31,
|
|
"end": 40,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 31,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"value": "y",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 32,
|
|
"end": 40,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 34,
|
|
"end": 40,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 42,
|
|
"end": 74,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 46,
|
|
"end": 74,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 46,
|
|
"end": 51,
|
|
"ctxt": 0
|
|
},
|
|
"value": "array",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "ArrayExpression",
|
|
"span": {
|
|
"start": 54,
|
|
"end": 74,
|
|
"ctxt": 0
|
|
},
|
|
"elements": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 55,
|
|
"end": 73,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 57,
|
|
"end": 58,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 60,
|
|
"end": 62,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"raw": "\"\""
|
|
}
|
|
},
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 64,
|
|
"end": 65,
|
|
"ctxt": 0
|
|
},
|
|
"value": "y",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 67,
|
|
"end": 71,
|
|
"ctxt": 0
|
|
},
|
|
"value": true
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "TsEnumDeclaration",
|
|
"span": {
|
|
"start": 75,
|
|
"end": 87,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"isConst": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 80,
|
|
"end": 81,
|
|
"ctxt": 0
|
|
},
|
|
"value": "E",
|
|
"optional": false
|
|
},
|
|
"members": [
|
|
{
|
|
"type": "TsEnumMember",
|
|
"span": {
|
|
"start": 84,
|
|
"end": 85,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 84,
|
|
"end": 85,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"init": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ForOfStatement",
|
|
"span": {
|
|
"start": 88,
|
|
"end": 136,
|
|
"ctxt": 0
|
|
},
|
|
"await": null,
|
|
"left": {
|
|
"type": "ObjectPattern",
|
|
"span": {
|
|
"start": 93,
|
|
"end": 108,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "AssignmentPatternProperty",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 95,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 95,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"value": null
|
|
},
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 97,
|
|
"end": 98,
|
|
"ctxt": 0
|
|
},
|
|
"value": "y",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "AssignmentPattern",
|
|
"span": {
|
|
"start": 100,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 100,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"value": "y",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 104,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 104,
|
|
"end": 105,
|
|
"ctxt": 0
|
|
},
|
|
"value": "E",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 106,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 112,
|
|
"end": 117,
|
|
"ctxt": 0
|
|
},
|
|
"value": "array",
|
|
"optional": false
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 119,
|
|
"end": 136,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 125,
|
|
"end": 127,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 125,
|
|
"end": 126,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 132,
|
|
"end": 134,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 132,
|
|
"end": 133,
|
|
"ctxt": 0
|
|
},
|
|
"value": "y",
|
|
"optional": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|