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

520 lines
12 KiB
JSON

{
"type": "Script",
"span": {
"start": 61,
"end": 405,
"ctxt": 0
},
"body": [
{
"type": "ForStatement",
"span": {
"start": 61,
"end": 85,
"ctxt": 0
},
"init": null,
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 71,
"end": 85,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 77,
"end": 83,
"ctxt": 0
},
"label": null
}
]
}
},
{
"type": "LabeledStatement",
"span": {
"start": 87,
"end": 120,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 87,
"end": 90,
"ctxt": 0
},
"value": "ONE",
"optional": false
},
"body": {
"type": "ForStatement",
"span": {
"start": 92,
"end": 120,
"ctxt": 0
},
"init": null,
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 102,
"end": 120,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 108,
"end": 118,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 114,
"end": 117,
"ctxt": 0
},
"value": "ONE",
"optional": false
}
}
]
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 122,
"end": 164,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 122,
"end": 125,
"ctxt": 0
},
"value": "TWO",
"optional": false
},
"body": {
"type": "LabeledStatement",
"span": {
"start": 127,
"end": 164,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 127,
"end": 132,
"ctxt": 0
},
"value": "THREE",
"optional": false
},
"body": {
"type": "ForStatement",
"span": {
"start": 134,
"end": 164,
"ctxt": 0
},
"init": null,
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 144,
"end": 164,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 150,
"end": 162,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 156,
"end": 161,
"ctxt": 0
},
"value": "THREE",
"optional": false
}
}
]
}
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 166,
"end": 237,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 166,
"end": 170,
"ctxt": 0
},
"value": "FOUR",
"optional": false
},
"body": {
"type": "ForStatement",
"span": {
"start": 172,
"end": 237,
"ctxt": 0
},
"init": null,
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 182,
"end": 237,
"ctxt": 0
},
"stmts": [
{
"type": "LabeledStatement",
"span": {
"start": 188,
"end": 235,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 188,
"end": 192,
"ctxt": 0
},
"value": "FIVE",
"optional": false
},
"body": {
"type": "ForStatement",
"span": {
"start": 198,
"end": 235,
"ctxt": 0
},
"init": null,
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 208,
"end": 235,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 218,
"end": 229,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 224,
"end": 228,
"ctxt": 0
},
"value": "FOUR",
"optional": false
}
}
]
}
}
}
]
}
}
},
{
"type": "ForStatement",
"span": {
"start": 239,
"end": 286,
"ctxt": 0
},
"init": null,
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 249,
"end": 286,
"ctxt": 0
},
"stmts": [
{
"type": "LabeledStatement",
"span": {
"start": 255,
"end": 284,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 255,
"end": 258,
"ctxt": 0
},
"value": "SIX",
"optional": false
},
"body": {
"type": "ForStatement",
"span": {
"start": 264,
"end": 284,
"ctxt": 0
},
"init": null,
"test": null,
"update": null,
"body": {
"type": "BreakStatement",
"span": {
"start": 274,
"end": 284,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 280,
"end": 283,
"ctxt": 0
},
"value": "SIX",
"optional": false
}
}
}
}
]
}
},
{
"type": "LabeledStatement",
"span": {
"start": 288,
"end": 337,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 288,
"end": 293,
"ctxt": 0
},
"value": "SEVEN",
"optional": false
},
"body": {
"type": "ForStatement",
"span": {
"start": 295,
"end": 337,
"ctxt": 0
},
"init": null,
"test": null,
"update": null,
"body": {
"type": "ForStatement",
"span": {
"start": 305,
"end": 337,
"ctxt": 0
},
"init": null,
"test": null,
"update": null,
"body": {
"type": "ForStatement",
"span": {
"start": 315,
"end": 337,
"ctxt": 0
},
"init": null,
"test": null,
"update": null,
"body": {
"type": "BreakStatement",
"span": {
"start": 325,
"end": 337,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 331,
"end": 336,
"ctxt": 0
},
"value": "SEVEN",
"optional": false
}
}
}
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 339,
"end": 405,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 339,
"end": 344,
"ctxt": 0
},
"value": "EIGHT",
"optional": false
},
"body": {
"type": "ForStatement",
"span": {
"start": 346,
"end": 405,
"ctxt": 0
},
"init": null,
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 356,
"end": 405,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 362,
"end": 386,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 366,
"end": 386,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 366,
"end": 368,
"ctxt": 0
},
"value": "fn",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 371,
"end": 386,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 383,
"end": 386,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "BreakStatement",
"span": {
"start": 391,
"end": 403,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 397,
"end": 402,
"ctxt": 0
},
"value": "EIGHT",
"optional": false
}
}
]
}
}
}
],
"interpreter": null
}