nashorn/test/script/basic/parser/tryCatchStat.js.EXPECTED
author sundar
Thu, 12 Sep 2013 22:16:40 +0530
changeset 19894 195477810711
child 29407 3fd4ede1581e
permissions -rw-r--r--
8024693: Various minor issues with JSONWriter used by script parser API Reviewed-by: jlaskey, hannesw

{
    "type": "Program",
    "body": [
        {
            "type": "BlockStatement",
            "block": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "TryStatement",
                        "block": {
                            "type": "BlockStatement",
                            "body": []
                        },
                        "guardedHandlers": [],
                        "handler": {
                            "type": "CatchClause",
                            "param": {
                                "type": "Identifier",
                                "name": "e"
                            },
                            "body": {
                                "type": "BlockStatement",
                                "body": []
                            }
                        },
                        "finalizer": null
                    }
                ]
            }
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "BlockStatement",
            "block": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "TryStatement",
                        "block": {
                            "type": "BlockStatement",
                            "body": []
                        },
                        "guardedHandlers": [],
                        "handler": {
                            "type": "CatchClause",
                            "param": {
                                "type": "Identifier",
                                "name": "e"
                            },
                            "body": {
                                "type": "BlockStatement",
                                "body": []
                            }
                        },
                        "finalizer": {
                            "type": "BlockStatement",
                            "body": []
                        }
                    }
                ]
            }
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "BlockStatement",
            "block": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "TryStatement",
                        "block": {
                            "type": "BlockStatement",
                            "body": []
                        },
                        "guardedHandlers": [],
                        "handler": null,
                        "finalizer": {
                            "type": "BlockStatement",
                            "body": []
                        }
                    }
                ]
            }
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "BlockStatement",
            "block": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "TryStatement",
                        "block": {
                            "type": "BlockStatement",
                            "body": []
                        },
                        "guardedHandlers": [],
                        "handler": {
                            "type": "CatchClause",
                            "param": {
                                "type": "Identifier",
                                "name": "e"
                            },
                            "body": {
                                "type": "BlockStatement",
                                "body": [
                                    {
                                        "type": "ExpressionStatement",
                                        "expression": {
                                            "type": "CallExpression",
                                            "callee": {
                                                "type": "Identifier",
                                                "name": "handle"
                                            },
                                            "arguments": []
                                        }
                                    }
                                ]
                            }
                        },
                        "finalizer": null
                    }
                ]
            }
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "BlockStatement",
            "block": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "TryStatement",
                        "block": {
                            "type": "BlockStatement",
                            "body": [
                                {
                                    "type": "ExpressionStatement",
                                    "expression": {
                                        "type": "CallExpression",
                                        "callee": {
                                            "type": "Identifier",
                                            "name": "that"
                                        },
                                        "arguments": []
                                    }
                                }
                            ]
                        },
                        "guardedHandlers": [],
                        "handler": {
                            "type": "CatchClause",
                            "param": {
                                "type": "Identifier",
                                "name": "e"
                            },
                            "body": {
                                "type": "BlockStatement",
                                "body": [
                                    {
                                        "type": "ExpressionStatement",
                                        "expression": {
                                            "type": "CallExpression",
                                            "callee": {
                                                "type": "Identifier",
                                                "name": "handle"
                                            },
                                            "arguments": []
                                        }
                                    }
                                ]
                            }
                        },
                        "finalizer": {
                            "type": "BlockStatement",
                            "body": [
                                {
                                    "type": "ExpressionStatement",
                                    "expression": {
                                        "type": "CallExpression",
                                        "callee": {
                                            "type": "Identifier",
                                            "name": "clean"
                                        },
                                        "arguments": []
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "BlockStatement",
            "block": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "TryStatement",
                        "block": {
                            "type": "BlockStatement",
                            "body": [
                                {
                                    "type": "ExpressionStatement",
                                    "expression": {
                                        "type": "CallExpression",
                                        "callee": {
                                            "type": "Identifier",
                                            "name": "that"
                                        },
                                        "arguments": []
                                    }
                                }
                            ]
                        },
                        "guardedHandlers": [
                            {
                                "type": "CatchClause",
                                "param": {
                                    "type": "Identifier",
                                    "name": "e"
                                },
                                "guard": {
                                    "type": "BinaryExpression",
                                    "operator": "instanceof",
                                    "left": {
                                        "type": "Identifier",
                                        "name": "e"
                                    },
                                    "right": {
                                        "type": "Identifier",
                                        "name": "TypeError"
                                    }
                                },
                                "body": {
                                    "type": "BlockStatement",
                                    "body": [
                                        {
                                            "type": "ExpressionStatement",
                                            "expression": {
                                                "type": "CallExpression",
                                                "callee": {
                                                    "type": "Identifier",
                                                    "name": "handle"
                                                },
                                                "arguments": []
                                            }
                                        }
                                    ]
                                }
                            }
                        ],
                        "handler": {
                            "type": "CatchClause",
                            "param": {
                                "type": "Identifier",
                                "name": "e"
                            },
                            "body": {
                                "type": "BlockStatement",
                                "body": [
                                    {
                                        "type": "ExpressionStatement",
                                        "expression": {
                                            "type": "CallExpression",
                                            "callee": {
                                                "type": "Identifier",
                                                "name": "rest"
                                            },
                                            "arguments": []
                                        }
                                    }
                                ]
                            }
                        },
                        "finalizer": null
                    }
                ]
            }
        }
    ]
}