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

241 lines
6.0 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 91,
"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": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 39,
"end": 43,
"ctxt": 0
},
"value": true
}
}
]
}
}
]
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ForOfStatement",
"span": {
"start": 48,
"end": 91,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 53,
"end": 65,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 59,
"end": 65,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 59,
"end": 65,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 60,
"end": 61,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 63,
"end": 64,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "Identifier",
"span": {
"start": 69,
"end": 72,
"ctxt": 0
},
"value": "map",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 74,
"end": 91,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 80,
"end": 82,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 80,
"end": 81,
"ctxt": 0
},
"value": "k",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 87,
"end": 89,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 87,
"end": 88,
"ctxt": 0
},
"value": "v",
"optional": false
}
}
]
}
}
],
"interpreter": null
}