1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/script/basic/parser/tryCatchStat.js.EXPECTED Thu Sep 12 22:16:40 2013 +0530 1.3 @@ -0,0 +1,305 @@ 1.4 +{ 1.5 + "type": "Program", 1.6 + "body": [ 1.7 + { 1.8 + "type": "BlockStatement", 1.9 + "block": { 1.10 + "type": "BlockStatement", 1.11 + "body": [ 1.12 + { 1.13 + "type": "TryStatement", 1.14 + "block": { 1.15 + "type": "BlockStatement", 1.16 + "body": [] 1.17 + }, 1.18 + "guardedHandlers": [], 1.19 + "handler": { 1.20 + "type": "CatchClause", 1.21 + "param": { 1.22 + "type": "Identifier", 1.23 + "name": "e" 1.24 + }, 1.25 + "body": { 1.26 + "type": "BlockStatement", 1.27 + "body": [] 1.28 + } 1.29 + }, 1.30 + "finalizer": null 1.31 + } 1.32 + ] 1.33 + } 1.34 + } 1.35 + ] 1.36 +} 1.37 +{ 1.38 + "type": "Program", 1.39 + "body": [ 1.40 + { 1.41 + "type": "BlockStatement", 1.42 + "block": { 1.43 + "type": "BlockStatement", 1.44 + "body": [ 1.45 + { 1.46 + "type": "TryStatement", 1.47 + "block": { 1.48 + "type": "BlockStatement", 1.49 + "body": [] 1.50 + }, 1.51 + "guardedHandlers": [], 1.52 + "handler": { 1.53 + "type": "CatchClause", 1.54 + "param": { 1.55 + "type": "Identifier", 1.56 + "name": "e" 1.57 + }, 1.58 + "body": { 1.59 + "type": "BlockStatement", 1.60 + "body": [] 1.61 + } 1.62 + }, 1.63 + "finalizer": { 1.64 + "type": "BlockStatement", 1.65 + "body": [] 1.66 + } 1.67 + } 1.68 + ] 1.69 + } 1.70 + } 1.71 + ] 1.72 +} 1.73 +{ 1.74 + "type": "Program", 1.75 + "body": [ 1.76 + { 1.77 + "type": "BlockStatement", 1.78 + "block": { 1.79 + "type": "BlockStatement", 1.80 + "body": [ 1.81 + { 1.82 + "type": "TryStatement", 1.83 + "block": { 1.84 + "type": "BlockStatement", 1.85 + "body": [] 1.86 + }, 1.87 + "guardedHandlers": [], 1.88 + "handler": null, 1.89 + "finalizer": { 1.90 + "type": "BlockStatement", 1.91 + "body": [] 1.92 + } 1.93 + } 1.94 + ] 1.95 + } 1.96 + } 1.97 + ] 1.98 +} 1.99 +{ 1.100 + "type": "Program", 1.101 + "body": [ 1.102 + { 1.103 + "type": "BlockStatement", 1.104 + "block": { 1.105 + "type": "BlockStatement", 1.106 + "body": [ 1.107 + { 1.108 + "type": "TryStatement", 1.109 + "block": { 1.110 + "type": "BlockStatement", 1.111 + "body": [] 1.112 + }, 1.113 + "guardedHandlers": [], 1.114 + "handler": { 1.115 + "type": "CatchClause", 1.116 + "param": { 1.117 + "type": "Identifier", 1.118 + "name": "e" 1.119 + }, 1.120 + "body": { 1.121 + "type": "BlockStatement", 1.122 + "body": [ 1.123 + { 1.124 + "type": "ExpressionStatement", 1.125 + "expression": { 1.126 + "type": "CallExpression", 1.127 + "callee": { 1.128 + "type": "Identifier", 1.129 + "name": "handle" 1.130 + }, 1.131 + "arguments": [] 1.132 + } 1.133 + } 1.134 + ] 1.135 + } 1.136 + }, 1.137 + "finalizer": null 1.138 + } 1.139 + ] 1.140 + } 1.141 + } 1.142 + ] 1.143 +} 1.144 +{ 1.145 + "type": "Program", 1.146 + "body": [ 1.147 + { 1.148 + "type": "BlockStatement", 1.149 + "block": { 1.150 + "type": "BlockStatement", 1.151 + "body": [ 1.152 + { 1.153 + "type": "TryStatement", 1.154 + "block": { 1.155 + "type": "BlockStatement", 1.156 + "body": [ 1.157 + { 1.158 + "type": "ExpressionStatement", 1.159 + "expression": { 1.160 + "type": "CallExpression", 1.161 + "callee": { 1.162 + "type": "Identifier", 1.163 + "name": "that" 1.164 + }, 1.165 + "arguments": [] 1.166 + } 1.167 + } 1.168 + ] 1.169 + }, 1.170 + "guardedHandlers": [], 1.171 + "handler": { 1.172 + "type": "CatchClause", 1.173 + "param": { 1.174 + "type": "Identifier", 1.175 + "name": "e" 1.176 + }, 1.177 + "body": { 1.178 + "type": "BlockStatement", 1.179 + "body": [ 1.180 + { 1.181 + "type": "ExpressionStatement", 1.182 + "expression": { 1.183 + "type": "CallExpression", 1.184 + "callee": { 1.185 + "type": "Identifier", 1.186 + "name": "handle" 1.187 + }, 1.188 + "arguments": [] 1.189 + } 1.190 + } 1.191 + ] 1.192 + } 1.193 + }, 1.194 + "finalizer": { 1.195 + "type": "BlockStatement", 1.196 + "body": [ 1.197 + { 1.198 + "type": "ExpressionStatement", 1.199 + "expression": { 1.200 + "type": "CallExpression", 1.201 + "callee": { 1.202 + "type": "Identifier", 1.203 + "name": "clean" 1.204 + }, 1.205 + "arguments": [] 1.206 + } 1.207 + } 1.208 + ] 1.209 + } 1.210 + } 1.211 + ] 1.212 + } 1.213 + } 1.214 + ] 1.215 +} 1.216 +{ 1.217 + "type": "Program", 1.218 + "body": [ 1.219 + { 1.220 + "type": "BlockStatement", 1.221 + "block": { 1.222 + "type": "BlockStatement", 1.223 + "body": [ 1.224 + { 1.225 + "type": "TryStatement", 1.226 + "block": { 1.227 + "type": "BlockStatement", 1.228 + "body": [ 1.229 + { 1.230 + "type": "ExpressionStatement", 1.231 + "expression": { 1.232 + "type": "CallExpression", 1.233 + "callee": { 1.234 + "type": "Identifier", 1.235 + "name": "that" 1.236 + }, 1.237 + "arguments": [] 1.238 + } 1.239 + } 1.240 + ] 1.241 + }, 1.242 + "guardedHandlers": [ 1.243 + { 1.244 + "type": "CatchClause", 1.245 + "param": { 1.246 + "type": "Identifier", 1.247 + "name": "e" 1.248 + }, 1.249 + "guard": { 1.250 + "type": "BinaryExpression", 1.251 + "operator": "instanceof", 1.252 + "left": { 1.253 + "type": "Identifier", 1.254 + "name": "e" 1.255 + }, 1.256 + "right": { 1.257 + "type": "Identifier", 1.258 + "name": "TypeError" 1.259 + } 1.260 + }, 1.261 + "body": { 1.262 + "type": "BlockStatement", 1.263 + "body": [ 1.264 + { 1.265 + "type": "ExpressionStatement", 1.266 + "expression": { 1.267 + "type": "CallExpression", 1.268 + "callee": { 1.269 + "type": "Identifier", 1.270 + "name": "handle" 1.271 + }, 1.272 + "arguments": [] 1.273 + } 1.274 + } 1.275 + ] 1.276 + } 1.277 + } 1.278 + ], 1.279 + "handler": { 1.280 + "type": "CatchClause", 1.281 + "param": { 1.282 + "type": "Identifier", 1.283 + "name": "e" 1.284 + }, 1.285 + "body": { 1.286 + "type": "BlockStatement", 1.287 + "body": [ 1.288 + { 1.289 + "type": "ExpressionStatement", 1.290 + "expression": { 1.291 + "type": "CallExpression", 1.292 + "callee": { 1.293 + "type": "Identifier", 1.294 + "name": "rest" 1.295 + }, 1.296 + "arguments": [] 1.297 + } 1.298 + } 1.299 + ] 1.300 + } 1.301 + }, 1.302 + "finalizer": null 1.303 + } 1.304 + ] 1.305 + } 1.306 + } 1.307 + ] 1.308 +}