nashorn/test/script/basic/parser/switchStat.js.EXPECTED
author serb
Thu, 30 Jul 2015 15:27:02 +0300
changeset 32126 6611b32dfa58
parent 19894 195477810711
permissions -rw-r--r--
8132382: [macosx] Crash during JMC or JavaFX execution when NSApplication is controlled by SWT or JavaFX libraries Reviewed-by: kizune, alexsch

{
    "type": "Program",
    "body": [
        {
            "type": "SwitchStatement",
            "discriminant": {
                "type": "Identifier",
                "name": "key"
            },
            "cases": []
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "SwitchStatement",
            "discriminant": {
                "type": "Identifier",
                "name": "key"
            },
            "cases": [
                {
                    "type": "SwitchCase",
                    "test": {
                        "type": "Literal",
                        "value": 2
                    },
                    "consequent": [
                        {
                            "type": "ExpressionStatement",
                            "expression": {
                                "type": "CallExpression",
                                "callee": {
                                    "type": "Identifier",
                                    "name": "hello"
                                },
                                "arguments": []
                            }
                        },
                        {
                            "type": "BreakStatement",
                            "label": null
                        }
                    ]
                }
            ]
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "SwitchStatement",
            "discriminant": {
                "type": "Identifier",
                "name": "key"
            },
            "cases": [
                {
                    "type": "SwitchCase",
                    "test": {
                        "type": "Literal",
                        "value": 4
                    },
                    "consequent": [
                        {
                            "type": "ExpressionStatement",
                            "expression": {
                                "type": "CallExpression",
                                "callee": {
                                    "type": "Identifier",
                                    "name": "hello"
                                },
                                "arguments": []
                            }
                        },
                        {
                            "type": "BreakStatement",
                            "label": null
                        }
                    ]
                },
                {
                    "type": "SwitchCase",
                    "test": {
                        "type": "Literal",
                        "value": 2
                    },
                    "consequent": [
                        {
                            "type": "ExpressionStatement",
                            "expression": {
                                "type": "CallExpression",
                                "callee": {
                                    "type": "Identifier",
                                    "name": "world"
                                },
                                "arguments": []
                            }
                        },
                        {
                            "type": "BreakStatement",
                            "label": null
                        }
                    ]
                },
                {
                    "type": "SwitchCase",
                    "test": null,
                    "consequent": [
                        {
                            "type": "BreakStatement",
                            "label": null
                        }
                    ]
                }
            ]
        }
    ]
}