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

586 lines
13 KiB
JSON

{
"type": "Script",
"span": {
"start": 61,
"end": 471,
"ctxt": 0
},
"body": [
{
"type": "WhileStatement",
"span": {
"start": 61,
"end": 87,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 67,
"end": 71,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 73,
"end": 87,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 79,
"end": 85,
"ctxt": 0
},
"label": null
}
]
}
},
{
"type": "LabeledStatement",
"span": {
"start": 90,
"end": 127,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 90,
"end": 93,
"ctxt": 0
},
"value": "ONE",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 96,
"end": 127,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 103,
"end": 107,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 109,
"end": 127,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 115,
"end": 125,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 121,
"end": 124,
"ctxt": 0
},
"value": "ONE",
"optional": false
}
}
]
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 129,
"end": 174,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 129,
"end": 132,
"ctxt": 0
},
"value": "TWO",
"optional": false
},
"body": {
"type": "LabeledStatement",
"span": {
"start": 134,
"end": 174,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 134,
"end": 139,
"ctxt": 0
},
"value": "THREE",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 141,
"end": 174,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 148,
"end": 152,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 154,
"end": 174,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 160,
"end": 172,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 166,
"end": 171,
"ctxt": 0
},
"value": "THREE",
"optional": false
}
}
]
}
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 176,
"end": 253,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 176,
"end": 180,
"ctxt": 0
},
"value": "FOUR",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 182,
"end": 253,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 189,
"end": 193,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 195,
"end": 253,
"ctxt": 0
},
"stmts": [
{
"type": "LabeledStatement",
"span": {
"start": 201,
"end": 251,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 201,
"end": 205,
"ctxt": 0
},
"value": "FIVE",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 211,
"end": 251,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 218,
"end": 222,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 224,
"end": 251,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 234,
"end": 245,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 240,
"end": 244,
"ctxt": 0
},
"value": "FOUR",
"optional": false
}
}
]
}
}
}
]
}
}
},
{
"type": "WhileStatement",
"span": {
"start": 255,
"end": 316,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 262,
"end": 266,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 268,
"end": 316,
"ctxt": 0
},
"stmts": [
{
"type": "LabeledStatement",
"span": {
"start": 274,
"end": 314,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 274,
"end": 277,
"ctxt": 0
},
"value": "SIX",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 283,
"end": 314,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 290,
"end": 294,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BreakStatement",
"span": {
"start": 304,
"end": 314,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 310,
"end": 313,
"ctxt": 0
},
"value": "SIX",
"optional": false
}
}
}
}
]
}
},
{
"type": "LabeledStatement",
"span": {
"start": 318,
"end": 400,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 318,
"end": 323,
"ctxt": 0
},
"value": "SEVEN",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 325,
"end": 400,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 332,
"end": 336,
"ctxt": 0
},
"value": true
},
"body": {
"type": "WhileStatement",
"span": {
"start": 342,
"end": 400,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 349,
"end": 353,
"ctxt": 0
},
"value": true
},
"body": {
"type": "WhileStatement",
"span": {
"start": 363,
"end": 400,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 370,
"end": 374,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BreakStatement",
"span": {
"start": 388,
"end": 400,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 394,
"end": 399,
"ctxt": 0
},
"value": "SEVEN",
"optional": false
}
}
}
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 402,
"end": 471,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 402,
"end": 407,
"ctxt": 0
},
"value": "EIGHT",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 409,
"end": 471,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 416,
"end": 420,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 422,
"end": 471,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 428,
"end": 452,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 432,
"end": 452,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 432,
"end": 434,
"ctxt": 0
},
"value": "fn",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 437,
"end": 452,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 449,
"end": 452,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "BreakStatement",
"span": {
"start": 457,
"end": 469,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 463,
"end": 468,
"ctxt": 0
},
"value": "EIGHT",
"optional": false
}
}
]
}
}
}
],
"interpreter": null
}