Index: src/preparser.h |
diff --git a/src/preparser.h b/src/preparser.h |
index d1d1c53e0b16979d91c4d233b1dd0e3096e1f1f1..6058f89cc025d29f35bd09046ea9d4956cb6a081 100644 |
--- a/src/preparser.h |
+++ b/src/preparser.h |
@@ -1232,6 +1232,11 @@ class PreParserTraits { |
Scanner* scanner, |
PreParserFactory* factory = NULL); |
+ PreParserExpression GetIterator(PreParserExpression iterable, |
+ PreParserFactory* factory) { |
+ return PreParserExpression::Default(); |
+ } |
+ |
static PreParserExpressionList NewExpressionList(int size, void* zone) { |
return PreParserExpressionList(); |
} |
@@ -2094,6 +2099,10 @@ ParserBase<Traits>::ParseYieldExpression(bool* ok) { |
break; |
} |
} |
+ if (kind == Yield::DELEGATING) { |
+ // var iterator = subject[Symbol.iterator](); |
+ expression = this->GetIterator(expression, factory()); |
+ } |
typename Traits::Type::YieldExpression yield = |
factory()->NewYield(generator_object, expression, kind, pos); |
if (kind == Yield::DELEGATING) { |