Index: src/parsing/pattern-rewriter.cc |
diff --git a/src/parsing/pattern-rewriter.cc b/src/parsing/pattern-rewriter.cc |
index af6060a44ba992f20191478a472190b9399bb333..e5211b41947156c64bf9477ec83015a69ec059ad 100644 |
--- a/src/parsing/pattern-rewriter.cc |
+++ b/src/parsing/pattern-rewriter.cc |
@@ -261,12 +261,14 @@ Variable* Parser::PatternRewriter::CreateTempVar(Expression* value) { |
void Parser::PatternRewriter::VisitRewritableExpression( |
RewritableExpression* node) { |
// If this is not a destructuring assignment... |
- if (!IsAssignmentContext() || !node->expression()->IsAssignment()) { |
+ if (!IsAssignmentContext()) { |
// Mark the node as rewritten to prevent redundant rewriting, and |
// perform BindingPattern rewriting |
DCHECK(!node->is_rewritten()); |
node->Rewrite(node->expression()); |
return Visit(node->expression()); |
+ } else if (!node->expression()->IsAssignment()) { |
+ return Visit(node->expression()); |
caitp
2016/09/01 15:34:41
my understanding is, this will recursively continu
|
} |
if (node->is_rewritten()) return; |