--- a/nashorn/test/script/basic/parser/tryCatchStat.js.EXPECTED Mon Mar 09 11:34:48 2015 +0100
+++ b/nashorn/test/script/basic/parser/tryCatchStat.js.EXPECTED Mon Mar 09 20:14:10 2015 +0530
@@ -1,32 +1,70 @@
+{
+ "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": "BlockStatement",
+ "type": "TryStatement",
"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
- }
- ]
+ "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": []
}
}
]
@@ -35,35 +73,36 @@
"type": "Program",
"body": [
{
- "type": "BlockStatement",
+ "type": "TryStatement",
"block": {
"type": "BlockStatement",
- "body": [
- {
- "type": "TryStatement",
- "block": {
- "type": "BlockStatement",
- "body": []
- },
- "guardedHandlers": [],
- "handler": {
- "type": "CatchClause",
- "param": {
- "type": "Identifier",
- "name": "e"
- },
- "body": {
- "type": "BlockStatement",
- "body": []
+ "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": {
- "type": "BlockStatement",
- "body": []
}
- }
- ]
- }
+ ]
+ }
+ },
+ "finalizer": null
}
]
}
@@ -71,21 +110,59 @@
"type": "Program",
"body": [
{
- "type": "BlockStatement",
+ "type": "TryStatement",
"block": {
"type": "BlockStatement",
"body": [
{
- "type": "TryStatement",
- "block": {
- "type": "BlockStatement",
- "body": []
- },
- "guardedHandlers": [],
- "handler": null,
- "finalizer": {
- "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": []
}
}
]
@@ -97,209 +174,84 @@
"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",
+ "type": "TryStatement",
"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": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
"type": "Identifier",
- "name": "e"
+ "name": "that"
},
- "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": []
- }
- }
- ]
+ "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
}
]
}
-{
- "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
- }
- ]
- }
- }
- ]
-}