swc/crates/swc_ecma_parser/tests/tsc/for-of38.json
2022-03-22 07:54:08 +00:00

237 lines
5.8 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 89,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 15,
"end": 47,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 19,
"end": 46,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 19,
"end": 22,
"ctxt": 0
},
"value": "map",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 25,
"end": 46,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 29,
"end": 32,
"ctxt": 0
},
"value": "Map",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 33,
"end": 45,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 34,
"end": 44,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 35,
"end": 37,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 39,
"end": 43,
"ctxt": 0
},
"value": true
}
}
]
}
}
]
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ForOfStatement",
"span": {
"start": 48,
"end": 89,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 53,
"end": 63,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 57,
"end": 63,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 57,
"end": 63,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 61,
"end": 62,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "Identifier",
"span": {
"start": 67,
"end": 70,
"ctxt": 0
},
"value": "map",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 72,
"end": 89,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 78,
"end": 80,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 78,
"end": 79,
"ctxt": 0
},
"value": "k",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 85,
"end": 87,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 85,
"end": 86,
"ctxt": 0
},
"value": "v",
"optional": false
}
}
]
}
}
],
"interpreter": null
}