mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 10:12:42 +03:00
297 lines
7.8 KiB
JSON
297 lines
7.8 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 45,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 20,
|
|
"end": 45,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 20,
|
|
"end": 25,
|
|
"ctxt": 0
|
|
},
|
|
"value": "array",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "ArrayExpression",
|
|
"span": {
|
|
"start": 28,
|
|
"end": 45,
|
|
"ctxt": 0
|
|
},
|
|
"elements": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 29,
|
|
"end": 44,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 31,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 34,
|
|
"end": 36,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"raw": "\"\""
|
|
}
|
|
},
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 38,
|
|
"end": 39,
|
|
"ctxt": 0
|
|
},
|
|
"value": "y",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 41,
|
|
"end": 42,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ForOfStatement",
|
|
"span": {
|
|
"start": 46,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"await": null,
|
|
"left": {
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 51,
|
|
"end": 79,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 55,
|
|
"end": 79,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"span": {
|
|
"start": 55,
|
|
"end": 79,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 57,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "AssignmentPattern",
|
|
"span": {
|
|
"start": 59,
|
|
"end": 65,
|
|
"ctxt": 0
|
|
},
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 59,
|
|
"end": 60,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 63,
|
|
"end": 65,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"raw": "\"\""
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 67,
|
|
"end": 68,
|
|
"ctxt": 0
|
|
},
|
|
"value": "y",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "AssignmentPattern",
|
|
"span": {
|
|
"start": 70,
|
|
"end": 78,
|
|
"ctxt": 0
|
|
},
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 70,
|
|
"end": 71,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 74,
|
|
"end": 78,
|
|
"ctxt": 0
|
|
},
|
|
"value": true
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 83,
|
|
"end": 88,
|
|
"ctxt": 0
|
|
},
|
|
"value": "array",
|
|
"optional": false
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 90,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 96,
|
|
"end": 98,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 96,
|
|
"end": 97,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 103,
|
|
"end": 105,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 103,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|