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

741 lines
17 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 547,
"ctxt": 0
},
"body": [
{
"type": "WhileStatement",
"span": {
"start": 1,
"end": 30,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 7,
"end": 11,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 13,
"end": 30,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 19,
"end": 28,
"ctxt": 0
},
"label": null
}
]
}
},
{
"type": "WhileStatement",
"span": {
"start": 33,
"end": 89,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 40,
"end": 44,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 46,
"end": 89,
"ctxt": 0
},
"stmts": [
{
"type": "IfStatement",
"span": {
"start": 52,
"end": 87,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 56,
"end": 60,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 62,
"end": 87,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 72,
"end": 81,
"ctxt": 0
},
"label": null
}
]
},
"alternate": null
}
]
}
},
{
"type": "LabeledStatement",
"span": {
"start": 91,
"end": 131,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 91,
"end": 94,
"ctxt": 0
},
"value": "ONE",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 97,
"end": 131,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 104,
"end": 108,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 110,
"end": 131,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 116,
"end": 129,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 125,
"end": 128,
"ctxt": 0
},
"value": "ONE",
"optional": false
}
}
]
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 133,
"end": 181,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 133,
"end": 136,
"ctxt": 0
},
"value": "TWO",
"optional": false
},
"body": {
"type": "LabeledStatement",
"span": {
"start": 138,
"end": 181,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 138,
"end": 143,
"ctxt": 0
},
"value": "THREE",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 145,
"end": 181,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 152,
"end": 156,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 158,
"end": 181,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 164,
"end": 179,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 173,
"end": 178,
"ctxt": 0
},
"value": "THREE",
"optional": false
}
}
]
}
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 183,
"end": 263,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 183,
"end": 187,
"ctxt": 0
},
"value": "FOUR",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 189,
"end": 263,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 196,
"end": 200,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 202,
"end": 263,
"ctxt": 0
},
"stmts": [
{
"type": "LabeledStatement",
"span": {
"start": 208,
"end": 261,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 208,
"end": 212,
"ctxt": 0
},
"value": "FIVE",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 218,
"end": 261,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 225,
"end": 229,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 231,
"end": 261,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 241,
"end": 255,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 250,
"end": 254,
"ctxt": 0
},
"value": "FOUR",
"optional": false
}
}
]
}
}
}
]
}
}
},
{
"type": "WhileStatement",
"span": {
"start": 265,
"end": 329,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 272,
"end": 276,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 278,
"end": 329,
"ctxt": 0
},
"stmts": [
{
"type": "LabeledStatement",
"span": {
"start": 284,
"end": 327,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 284,
"end": 287,
"ctxt": 0
},
"value": "SIX",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 293,
"end": 327,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 300,
"end": 304,
"ctxt": 0
},
"value": true
},
"body": {
"type": "ContinueStatement",
"span": {
"start": 314,
"end": 327,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 323,
"end": 326,
"ctxt": 0
},
"value": "SIX",
"optional": false
}
}
}
}
]
}
},
{
"type": "LabeledStatement",
"span": {
"start": 331,
"end": 416,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 331,
"end": 336,
"ctxt": 0
},
"value": "SEVEN",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 338,
"end": 416,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 345,
"end": 349,
"ctxt": 0
},
"value": true
},
"body": {
"type": "WhileStatement",
"span": {
"start": 355,
"end": 416,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 362,
"end": 366,
"ctxt": 0
},
"value": true
},
"body": {
"type": "WhileStatement",
"span": {
"start": 376,
"end": 416,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 383,
"end": 387,
"ctxt": 0
},
"value": true
},
"body": {
"type": "ContinueStatement",
"span": {
"start": 401,
"end": 416,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 410,
"end": 415,
"ctxt": 0
},
"value": "SEVEN",
"optional": false
}
}
}
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 418,
"end": 490,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 418,
"end": 423,
"ctxt": 0
},
"value": "EIGHT",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 425,
"end": 490,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 432,
"end": 436,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 438,
"end": 490,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 444,
"end": 468,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 448,
"end": 468,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 448,
"end": 450,
"ctxt": 0
},
"value": "fn",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 453,
"end": 468,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 465,
"end": 468,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "ContinueStatement",
"span": {
"start": 473,
"end": 488,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 482,
"end": 487,
"ctxt": 0
},
"value": "EIGHT",
"optional": false
}
}
]
}
}
},
{
"type": "LabeledStatement",
"span": {
"start": 492,
"end": 547,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 492,
"end": 496,
"ctxt": 0
},
"value": "NINE",
"optional": false
},
"body": {
"type": "WhileStatement",
"span": {
"start": 498,
"end": 547,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 505,
"end": 509,
"ctxt": 0
},
"value": true
},
"body": {
"type": "BlockStatement",
"span": {
"start": 511,
"end": 547,
"ctxt": 0
},
"stmts": [
{
"type": "IfStatement",
"span": {
"start": 517,
"end": 545,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 521,
"end": 525,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 527,
"end": 545,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 529,
"end": 543,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 538,
"end": 542,
"ctxt": 0
},
"value": "NINE",
"optional": false
}
}
]
},
"alternate": null
}
]
}
}
}
],
"interpreter": null
}