swc/crates/swc_ecma_parser/tests/tsc/emptyAssignmentPatterns02_ES5iterable.json

423 lines
10 KiB
JSON

{
"type": "Script",
"span": {
"start": 69,
"end": 156,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 69,
"end": 80,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 73,
"end": 79,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 73,
"end": 74,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 74,
"end": 79,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 76,
"end": 79,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 81,
"end": 105,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 85,
"end": 86,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 85,
"end": 86,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 94,
"end": 96,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 94,
"end": 96,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 98,
"end": 100,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 98,
"end": 100,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 102,
"end": 104,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 102,
"end": 104,
"ctxt": 0
},
"value": "a3",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 107,
"end": 130,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 107,
"end": 129,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 108,
"end": 128,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 108,
"end": 110,
"ctxt": 0
},
"properties": [],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 113,
"end": 128,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 113,
"end": 124,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 118,
"end": 119,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 118,
"end": 119,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": null
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 121,
"end": 122,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 121,
"end": 122,
"ctxt": 0
},
"value": "z",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 127,
"end": 128,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 131,
"end": 156,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 131,
"end": 155,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 132,
"end": 154,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 132,
"end": 134,
"ctxt": 0
},
"elements": [],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 137,
"end": 154,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 137,
"end": 150,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 139,
"end": 141,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 143,
"end": 145,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 147,
"end": 149,
"ctxt": 0
},
"value": "a3",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 153,
"end": 154,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
}
}
],
"interpreter": null
}