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

741 lines
17 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 546,
"ctxt": 0
},
"body": [
{
"type": "WhileStatement",
"span": {
"start": 0,
"end": 29,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 6,
"end": 10,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 12,
"end": 29,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 18,
"end": 27,
"ctxt": 0
},
"label": null
}
]
}
},
{
"type": "WhileStatement",
"span": {
"start": 32,
"end": 88,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 39,
"end": 43,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 45,
"end": 88,
"ctxt": 0
},
"stmts": [
{
"type": "IfStatement",
"span": {
"start": 51,
"end": 86,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 55,
"end": 59,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 61,
"end": 86,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 71,
"end": 80,
"ctxt": 0
},
"label": null
}
]
},
"alternate": null
}
]
}
},
{
"type": "LabeledStatement",
"span": {
"start": 90,
"end": 130,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 90,
"end": 93,
"ctxt": 0
},
"value": "ONE",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 96,
"end": 130,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 103,
"end": 107,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 109,
"end": 130,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 115,
"end": 128,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 124,
"end": 127,
"ctxt": 0
},
"value": "ONE",
"optional": false
}
}
]
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 132,
"end": 180,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 132,
"end": 135,
"ctxt": 0
},
"value": "TWO",
"optional": false
},
"body": {
"type": "LabeledStatement",
"span": {
"start": 137,
"end": 180,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 137,
"end": 142,
"ctxt": 0
},
"value": "THREE",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 144,
"end": 180,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 151,
"end": 155,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 157,
"end": 180,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 163,
"end": 178,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 172,
"end": 177,
"ctxt": 0
},
"value": "THREE",
"optional": false
}
}
]
}
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 182,
"end": 262,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 182,
"end": 186,
"ctxt": 0
},
"value": "FOUR",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 188,
"end": 262,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 195,
"end": 199,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 201,
"end": 262,
"ctxt": 0
},
"stmts": [
{
"type": "LabeledStatement",
"span": {
"start": 207,
"end": 260,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 207,
"end": 211,
"ctxt": 0
},
"value": "FIVE",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 217,
"end": 260,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 224,
"end": 228,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 230,
"end": 260,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 240,
"end": 254,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 249,
"end": 253,
"ctxt": 0
},
"value": "FOUR",
"optional": false
}
}
]
}
}
}
]
}
}
},
{
"type": "WhileStatement",
"span": {
"start": 264,
"end": 328,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 271,
"end": 275,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 277,
"end": 328,
"ctxt": 0
},
"stmts": [
{
"type": "LabeledStatement",
"span": {
"start": 283,
"end": 326,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 283,
"end": 286,
"ctxt": 0
},
"value": "SIX",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 292,
"end": 326,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 299,
"end": 303,
"ctxt": 0
},
"value": true
},
"body": {
"type": "ContinueStatement",
"span": {
"start": 313,
"end": 326,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 322,
"end": 325,
"ctxt": 0
},
"value": "SIX",
"optional": false
}
}
}
}
]
}
},
{
"type": "LabeledStatement",
"span": {
"start": 330,
"end": 415,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 330,
"end": 335,
"ctxt": 0
},
"value": "SEVEN",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 337,
"end": 415,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 344,
"end": 348,
"ctxt": 0
},
"value": true
},
"body": {
"type": "WhileStatement",
"span": {
"start": 354,
"end": 415,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 361,
"end": 365,
"ctxt": 0
},
"value": true
},
"body": {
"type": "WhileStatement",
"span": {
"start": 375,
"end": 415,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 382,
"end": 386,
"ctxt": 0
},
"value": true
},
"body": {
"type": "ContinueStatement",
"span": {
"start": 400,
"end": 415,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 409,
"end": 414,
"ctxt": 0
},
"value": "SEVEN",
"optional": false
}
}
}
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 417,
"end": 489,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 417,
"end": 422,
"ctxt": 0
},
"value": "EIGHT",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 424,
"end": 489,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 431,
"end": 435,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 437,
"end": 489,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 443,
"end": 467,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 447,
"end": 467,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 447,
"end": 449,
"ctxt": 0
},
"value": "fn",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 452,
"end": 467,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 464,
"end": 467,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "ContinueStatement",
"span": {
"start": 472,
"end": 487,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 481,
"end": 486,
"ctxt": 0
},
"value": "EIGHT",
"optional": false
}
}
]
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 491,
"end": 546,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 491,
"end": 495,
"ctxt": 0
},
"value": "NINE",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 497,
"end": 546,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 504,
"end": 508,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 510,
"end": 546,
"ctxt": 0
},
"stmts": [
{
"type": "IfStatement",
"span": {
"start": 516,
"end": 544,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 520,
"end": 524,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 526,
"end": 544,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 528,
"end": 542,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 537,
"end": 541,
"ctxt": 0
},
"value": "NINE",
"optional": false
}
}
]
},
"alternate": null
}
]
}
}
}
],
"interpreter": null
}