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

586 lines
13 KiB
JSON

{
"type": "Script",
"span": {
"start": 61,
"end": 463,
"ctxt": 0
},
"body": [
{
"type": "DoWhileStatement",
"span": {
"start": 61,
"end": 90,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 85,
"end": 89,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 64,
"end": 78,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 70,
"end": 76,
"ctxt": 0
},
"label": null
}
]
}
},
{
"type": "LabeledStatement",
"span": {
"start": 92,
"end": 131,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 92,
"end": 95,
"ctxt": 0
},
"value": "ONE",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 97,
"end": 131,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 126,
"end": 130,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 100,
"end": 118,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 106,
"end": 116,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 112,
"end": 115,
"ctxt": 0
},
"value": "ONE",
"optional": false
}
}
]
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 133,
"end": 180,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 133,
"end": 136,
"ctxt": 0
},
"value": "TWO",
"optional": false
},
"body": {
"type": "LabeledStatement",
"span": {
"start": 138,
"end": 180,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 138,
"end": 143,
"ctxt": 0
},
"value": "THREE",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 145,
"end": 180,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 175,
"end": 179,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 148,
"end": 168,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 154,
"end": 166,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 160,
"end": 165,
"ctxt": 0
},
"value": "THREE",
"optional": false
}
}
]
}
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 182,
"end": 263,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 182,
"end": 186,
"ctxt": 0
},
"value": "FOUR",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 188,
"end": 263,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 258,
"end": 262,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 191,
"end": 251,
"ctxt": 0
},
"stmts": [
{
"type": "LabeledStatement",
"span": {
"start": 197,
"end": 249,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 197,
"end": 201,
"ctxt": 0
},
"value": "FIVE",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 207,
"end": 249,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 244,
"end": 248,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 210,
"end": 237,
"ctxt": 0
},
"stmts": [
{
"type": "BreakStatement",
"span": {
"start": 220,
"end": 231,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 226,
"end": 230,
"ctxt": 0
},
"value": "FOUR",
"optional": false
}
}
]
}
}
}
]
}
}
},
{
"type": "DoWhileStatement",
"span": {
"start": 265,
"end": 322,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 317,
"end": 321,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 268,
"end": 310,
"ctxt": 0
},
"stmts": [
{
"type": "LabeledStatement",
"span": {
"start": 274,
"end": 308,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 274,
"end": 277,
"ctxt": 0
},
"value": "SIX",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 283,
"end": 308,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 303,
"end": 307,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BreakStatement",
"span": {
"start": 286,
"end": 296,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 292,
"end": 295,
"ctxt": 0
},
"value": "SIX",
"optional": false
}
}
}
}
]
}
},
{
"type": "LabeledStatement",
"span": {
"start": 324,
"end": 392,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 324,
"end": 329,
"ctxt": 0
},
"value": "SEVEN",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 331,
"end": 392,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 387,
"end": 391,
"ctxt": 0
},
"value": true
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 334,
"end": 378,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 373,
"end": 377,
"ctxt": 0
},
"value": true
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 337,
"end": 365,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 360,
"end": 364,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BreakStatement",
"span": {
"start": 340,
"end": 352,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 346,
"end": 351,
"ctxt": 0
},
"value": "SEVEN",
"optional": false
}
}
}
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 394,
"end": 463,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 394,
"end": 399,
"ctxt": 0
},
"value": "EIGHT",
"optional": false
},
"body": {
"type": "DoWhileStatement",
"span": {
"start": 401,
"end": 463,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 458,
"end": 462,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 403,
"end": 452,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 409,
"end": 433,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 413,
"end": 433,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 413,
"end": 415,
"ctxt": 0
},
"value": "fn",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 418,
"end": 433,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 430,
"end": 433,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "BreakStatement",
"span": {
"start": 438,
"end": 450,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 444,
"end": 449,
"ctxt": 0
},
"value": "EIGHT",
"optional": false
}
}
]
}
}
}
],
"interpreter": null
}