summaryrefslogtreecommitdiff
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 0033383189..d72162eeb1 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -2260,6 +2260,12 @@ bool Codegen::visit(FunctionDeclaration * ast)
return false;
}
+bool Codegen::visit(YieldExpression *ast)
+{
+ throwSyntaxError(ast->firstSourceLocation(), QLatin1String("Support for 'yield' unimplemented."));
+ return false;
+}
+
static bool endsWithReturn(Node *node)
{
if (!node)
@@ -2288,6 +2294,10 @@ int Codegen::defineFunction(const QString &name, AST::Node *ast,
{
enterContext(ast);
+ if (_context->isGenerator) {
+ throwSyntaxError(ast->firstSourceLocation(), QLatin1String("Support for generator functions unimplemented."));
+ }
+
if (_context->functionIndex >= 0)
// already defined
return leaveContext();