swc/crates/swc_ecma_parser/tests/tsc/ES5For-of29.json
Donny/강동윤 3958f1792c
refactor(es/ast): Remove unused fields (#7518)
**Related issue:**

 - Closes #7347.
 - Closes #7487.
2023-06-12 08:02:34 +00:00

221 lines
5.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 61,
"ctxt": 0
},
"body": [
{
"type": "ForOfStatement",
"span": {
"start": 1,
"end": 61,
"ctxt": 0
},
"await": false,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 6,
"end": 32,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 12,
"end": 32,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 12,
"end": 32,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Identifier",
"span": {
"start": 13,
"end": 14,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "AssignmentPattern",
"span": {
"start": 16,
"end": 21,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 16,
"end": 17,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
},
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Identifier",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": {
"type": "AssignmentPattern",
"span": {
"start": 26,
"end": 31,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
}
],
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 36,
"end": 42,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 40,
"end": 41,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
]
},
"body": {
"type": "BlockStatement",
"span": {
"start": 44,
"end": 61,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 50,
"end": 52,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 50,
"end": 51,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 57,
"end": 59,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
]
}
}
],
"interpreter": null
}