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

219 lines
4.7 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 39,
"end": 89,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 39,
"end": 50,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 43,
"end": 49,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 44,
"end": 49,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 46,
"end": 49,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 52,
"end": 61,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 52,
"end": 60,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 53,
"end": 59,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 53,
"end": 55,
"ctxt": 0
},
"properties": [],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 62,
"end": 71,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 62,
"end": 70,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 63,
"end": 69,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 63,
"end": 65,
"ctxt": 0
},
"elements": [],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 73,
"end": 89,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 77,
"end": 88,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 77,
"end": 80,
"ctxt": 0
},
"elements": [],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 83,
"end": 88,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 86,
"end": 87,
"ctxt": 0
},
"value": 2.0
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}