Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index 5377e1694d4cfaad0c1f782c9bd82b58b8fca809..a10b8220bb61bb3f2f26ac71b39702407949a411 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -643,6 +643,19 @@ Expression* ParserTraits::NewTargetExpression(Scope* scope, |
} |
+Expression* ParserTraits::FunctionSentExpression(Scope* scope, |
+ AstNodeFactory* factory, |
+ int pos) { |
+ // We desugar function.sent into %GeneratorGetInput(generator). |
+ Zone* zone = parser_->zone(); |
+ ZoneList<Expression*>* args = new (zone) ZoneList<Expression*>(1, zone); |
+ VariableProxy* generator = factory->NewVariableProxy( |
+ parser_->function_state_->generator_object_variable()); |
+ args->Add(generator, zone); |
+ return factory->NewCallRuntime(Runtime::kGeneratorGetInput, args, pos); |
+} |
+ |
+ |
Expression* ParserTraits::DefaultConstructor(bool call_super, Scope* scope, |
int pos, int end_pos, |
LanguageMode mode) { |