swc/crates/swc_ecma_parser/tests/tsc/for-of40.json

274 lines
7.0 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 103,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 16,
"end": 48,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 20,
"end": 47,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 20,
"end": 23,
"ctxt": 0
},
"value": "map",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 26,
"end": 47,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 30,
"end": 33,
"ctxt": 0
},
"value": "Map",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 34,
"end": 46,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 35,
"end": 45,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 36,
"end": 38,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 40,
"end": 44,
"ctxt": 0
},
"value": true
}
}
]
}
}
]
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ForOfStatement",
"span": {
"start": 49,
"end": 103,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 54,
"end": 77,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 58,
"end": 77,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 58,
"end": 77,
"ctxt": 0
},
"elements": [
{
"type": "AssignmentPattern",
"span": {
"start": 59,
"end": 65,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 59,
"end": 60,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 63,
"end": 65,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"typeAnnotation": null
},
{
"type": "AssignmentPattern",
"span": {
"start": 67,
"end": 76,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BooleanLiteral",
"span": {
"start": 71,
"end": 76,
"ctxt": 0
},
"value": false
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "Identifier",
"span": {
"start": 81,
"end": 84,
"ctxt": 0
},
"value": "map",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 86,
"end": 103,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 92,
"end": 94,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"value": "k",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 99,
"end": 101,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 99,
"end": 100,
"ctxt": 0
},
"value": "v",
"optional": false
}
}
]
}
}
],
"interpreter": null
}