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

586 lines
13 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 60,
"end": 462,
"ctxt": 0
},
"body": [
{
"type": "DoWhileStatement",
"span": {
"start": 60,
"end": 89,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 84,
"end": 88,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 63,
"end": 77,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 69,
"end": 75,
"ctxt": 0
},
"label": null
}
]
}
},
{
"type": "LabeledStatement",
"span": {
"start": 91,
"end": 130,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 91,
"end": 94,
"ctxt": 0
},
"value": "ONE",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 96,
"end": 130,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 125,
"end": 129,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 99,
"end": 117,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 105,
"end": 115,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 111,
"end": 114,
"ctxt": 0
},
"value": "ONE",
"optional": false
}
}
]
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 132,
"end": 179,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 132,
"end": 135,
"ctxt": 0
},
"value": "TWO",
"optional": false
},
"body": {
"type": "LabeledStatement",
"span": {
"start": 137,
"end": 179,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 137,
"end": 142,
"ctxt": 0
},
"value": "THREE",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 144,
"end": 179,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 174,
"end": 178,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 147,
"end": 167,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 153,
"end": 165,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 159,
"end": 164,
"ctxt": 0
},
"value": "THREE",
"optional": false
}
}
]
}
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 181,
"end": 262,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 181,
"end": 185,
"ctxt": 0
},
"value": "FOUR",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 187,
"end": 262,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 257,
"end": 261,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 190,
"end": 250,
"ctxt": 0
},
"stmts": [
{
"type": "LabeledStatement",
"span": {
"start": 196,
"end": 248,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 196,
"end": 200,
"ctxt": 0
},
"value": "FIVE",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 206,
"end": 248,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 243,
"end": 247,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 209,
"end": 236,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 219,
"end": 230,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 225,
"end": 229,
"ctxt": 0
},
"value": "FOUR",
"optional": false
}
}
]
}
}
}
]
}
}
},
{
"type": "DoWhileStatement",
"span": {
"start": 264,
"end": 321,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 316,
"end": 320,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 267,
"end": 309,
"ctxt": 0
},
"stmts": [
{
"type": "LabeledStatement",
"span": {
"start": 273,
"end": 307,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 273,
"end": 276,
"ctxt": 0
},
"value": "SIX",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 282,
"end": 307,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 302,
"end": 306,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BreakStatement",
"span": {
"start": 285,
"end": 295,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 291,
"end": 294,
"ctxt": 0
},
"value": "SIX",
"optional": false
}
}
}
}
]
}
},
{
"type": "LabeledStatement",
"span": {
"start": 323,
"end": 391,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 323,
"end": 328,
"ctxt": 0
},
"value": "SEVEN",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 330,
"end": 391,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 386,
"end": 390,
"ctxt": 0
},
"value": true
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 333,
"end": 377,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 372,
"end": 376,
"ctxt": 0
},
"value": true
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 336,
"end": 364,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 359,
"end": 363,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BreakStatement",
"span": {
"start": 339,
"end": 351,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 345,
"end": 350,
"ctxt": 0
},
"value": "SEVEN",
"optional": false
}
}
}
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 393,
"end": 462,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 393,
"end": 398,
"ctxt": 0
},
"value": "EIGHT",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 400,
"end": 462,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 457,
"end": 461,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 402,
"end": 451,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 408,
"end": 432,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 412,
"end": 432,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 412,
"end": 414,
"ctxt": 0
},
"value": "fn",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 417,
"end": 432,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 429,
"end": 432,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "BreakStatement",
"span": {
"start": 437,
"end": 449,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 443,
"end": 448,
"ctxt": 0
},
"value": "EIGHT",
"optional": false
}
}
]
}
}
}
],
"interpreter": null
}