aboutsummaryrefslogtreecommitdiff
path: root/lib/ast.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ast.js')
-rw-r--r--lib/ast.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/ast.js b/lib/ast.js
index 0fa48e28..1a291e31 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -498,12 +498,6 @@ var AST_Try = DEFNODE("Try", "bcatch bfinally", {
}
}, AST_Block);
-// XXX: this is wrong according to ECMA-262 (12.4). the catch block
-// should introduce another scope, as the argname should be visible
-// only inside the catch block. However, doing it this way because of
-// IE which simply introduces the name in the surrounding scope. If
-// we ever want to fix this then AST_Catch should inherit from
-// AST_Scope.
var AST_Catch = DEFNODE("Catch", "argname", {
$documentation: "A `catch` node; only makes sense as part of a `try` statement",
$propdoc: {
@@ -515,7 +509,7 @@ var AST_Catch = DEFNODE("Catch", "argname", {
walk_body(this, visitor);
});
}
-}, AST_Block);
+}, AST_Scope);
var AST_Finally = DEFNODE("Finally", null, {
$documentation: "A `finally` node; only makes sense as part of a `try` statement"