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

153 lines
3.2 KiB
JSON

{
"type": "Script",
"span": {
"start": 69,
"end": 101,
"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": "ExpressionStatement",
"span": {
"start": 82,
"end": 91,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 82,
"end": 90,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 83,
"end": 89,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 83,
"end": 85,
"ctxt": 0
},
"properties": [],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 92,
"end": 101,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 92,
"end": 100,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 93,
"end": 99,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 93,
"end": 95,
"ctxt": 0
},
"elements": [],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
}
],
"interpreter": null
}