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

157 lines
3.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 60,
"ctxt": 0
},
"body": [
{
"type": "LabeledStatement",
"span": {
"start": 1,
"end": 60,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 1,
"end": 7,
"ctxt": 0
},
"value": "label1",
"optional": false
},
"body": {
"type": "ForStatement",
"span": {
"start": 9,
"end": 60,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 13,
"end": 22,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 17,
"end": 22,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"value": "i",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"definite": false
}
]
},
"test": {
"type": "BinaryExpression",
"span": {
"start": 24,
"end": 29,
"ctxt": 0
},
"operator": "<",
"left": {
"type": "Identifier",
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"value": "i",
"optional": false
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 28,
"end": 29,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
"update": {
"type": "UpdateExpression",
"span": {
"start": 31,
"end": 34,
"ctxt": 0
},
"operator": "++",
"prefix": false,
"argument": {
"type": "Identifier",
"span": {
"start": 31,
"end": 32,
"ctxt": 0
},
"value": "i",
"optional": false
}
},
"body": {
"type": "BlockStatement",
"span": {
"start": 36,
"end": 60,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 42,
"end": 58,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 51,
"end": 57,
"ctxt": 0
},
"value": "label1",
"optional": false
}
}
]
}
}
}
],
"interpreter": null
}