Skip to content

Commit

Permalink
Remove redundant try-finally
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed May 18, 2015
1 parent 706f496 commit 766ce6c
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions src/referencer.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,15 @@ class PatternVisitor extends esrecurse.Visitor {

AssignmentPattern(pattern) {
this.assignments.push(pattern);
try {
this.visit(pattern.left);
this.rightHandNodes.push(pattern.right);
} finally {
this.assignments.pop();
}
this.visit(pattern.left);
this.rightHandNodes.push(pattern.right);
this.assignments.pop();
}

RestElement(pattern) {
this.restElements.push(pattern);
try {
this.visit(pattern.argument);
} finally {
this.restElements.pop();
}
this.visit(pattern.argument);
this.restElements.pop();
}

MemberExpression(node) {
Expand Down Expand Up @@ -127,12 +121,9 @@ class PatternVisitor extends esrecurse.Visitor {

AssignmentExpression(node) {
this.assignments.push(node);
try {
this.visit(node.left);
this.rightHandNodes.push(node.right);
} finally {
this.assignments.pop();
}
this.visit(node.left);
this.rightHandNodes.push(node.right);
this.assignments.pop();
}

CallExpression(node) {
Expand Down

0 comments on commit 766ce6c

Please sign in to comment.