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

155 lines
3.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 59,
"ctxt": 0
},
"body": [
{
"type": "LabeledStatement",
"span": {
"start": 0,
"end": 59,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"value": "label1",
"optional": false
},
"body": {
"type": "ForStatement",
"span": {
"start": 8,
"end": 59,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 12,
"end": 21,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 16,
"end": 21,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 16,
"end": 17,
"ctxt": 0
},
"value": "i",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"value": 0.0
},
"definite": false
}
]
},
"test": {
"type": "BinaryExpression",
"span": {
"start": 23,
"end": 28,
"ctxt": 0
},
"operator": "<",
"left": {
"type": "Identifier",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": "i",
"optional": false
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 27,
"end": 28,
"ctxt": 0
},
"value": 1.0
}
},
"update": {
"type": "UpdateExpression",
"span": {
"start": 30,
"end": 33,
"ctxt": 0
},
"operator": "++",
"prefix": false,
"argument": {
"type": "Identifier",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"value": "i",
"optional": false
}
},
"body": {
"type": "BlockStatement",
"span": {
"start": 35,
"end": 59,
"ctxt": 0
},
"stmts": [
{
"type": "ContinueStatement",
"span": {
"start": 41,
"end": 57,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 50,
"end": 56,
"ctxt": 0
},
"value": "label1",
"optional": false
}
}
]
}
}
}
],
"interpreter": null
}