test/nashorn/script/basic/parser/tryCatchStat.js.EXPECTED
changeset 47216 71c04702a3d5
parent 29407 3fd4ede1581e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/nashorn/script/basic/parser/tryCatchStat.js.EXPECTED	Tue Sep 12 19:03:39 2017 +0200
@@ -0,0 +1,257 @@
+{
+    "type": "Program",
+    "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": "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": "TryStatement",
+            "block": {
+                "type": "BlockStatement",
+                "body": []
+            },
+            "guardedHandlers": [],
+            "handler": null,
+            "finalizer": {
+                "type": "BlockStatement",
+                "body": []
+            }
+        }
+    ]
+}
+{
+    "type": "Program",
+    "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": "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": "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
+        }
+    ]
+}