org.python.antlr.ParseException: 'return' with argument inside generator at org.netbeans.modules.python.editor.scopes.ScopeInfo.defineAsGenerator(ScopeInfo.java:563) at org.netbeans.modules.python.editor.scopes.ScopesCompiler.visitYield(ScopesCompiler.java:568) at org.python.antlr.ast.Yield.accept(Yield.java:116) at org.python.antlr.ast.Expr.traverse(Expr.java:121) at org.python.antlr.Visitor.traverse(Visitor.java:12) at org.netbeans.modules.python.editor.scopes.ScopesCompiler.traverse(ScopesCompiler.java:98) at org.python.antlr.ast.VisitorBase.visitExpr(VisitorBase.java:166) at org.python.antlr.ast.Expr.accept(Expr.java:116) at org.python.antlr.ast.If.traverse(If.java:210) at org.python.antlr.Visitor.traverse(Visitor.java:12) at org.netbeans.modules.python.editor.scopes.ScopesCompiler.traverse(ScopesCompiler.java:98) at org.python.antlr.ast.VisitorBase.visitIf(VisitorBase.java:106) at org.python.antlr.ast.If.accept(If.java:195) at org.python.antlr.Visitor.visit(Visitor.java:26) at org.netbeans.modules.python.editor.scopes.ScopesCompiler.suite(ScopesCompiler.java:334) at org.netbeans.modules.python.editor.scopes.ScopesCompiler.visitFunctionDef(ScopesCompiler.java:298) at org.python.antlr.ast.FunctionDef.accept(FunctionDef.java:217) at org.python.antlr.Visitor.visit(Visitor.java:26) at org.netbeans.modules.python.editor.scopes.ScopesCompiler.suite(ScopesCompiler.java:334) at org.netbeans.modules.python.editor.scopes.ScopesCompiler.visitModule(ScopesCompiler.java:181) at org.python.antlr.ast.Module.accept(Module.java:120) at org.python.antlr.Visitor.visit(Visitor.java:26) at org.netbeans.modules.python.editor.scopes.ScopesCompiler.parse(ScopesCompiler.java:138) at org.netbeans.modules.python.editor.scopes.SymbolTable.(SymbolTable.java:140) at org.netbeans.modules.python.editor.PythonParserResult.getSymbolTable(PythonParserResult.java:107) at org.netbeans.modules.python.editor.PythonIndexer$IndexTask.scan(PythonIndexer.java:291) at org.netbeans.modules.python.editor.PythonIndexer.index(PythonIndexer.java:172) at org.netbeans.modules.gsfret.source.usages.CachingIndexer$LanguageIndex.index(CachingIndexer.java:174) at org.netbeans.modules.gsfret.source.usages.CachingIndexer.index(CachingIndexer.java:118) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater.batchCompile(RepositoryUpdater.java:2031) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker.updateFolder(RepositoryUpdater.java:1404) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker.scanRoots(RepositoryUpdater.java:1129) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker.access$1900(RepositoryUpdater.java:651) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker$1.run(RepositoryUpdater.java:789) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker$1.run(RepositoryUpdater.java:676) at org.netbeans.modules.gsfret.source.usages.ClassIndexManager.writeLock(ClassIndexManager.java:107) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker.run(RepositoryUpdater.java:676) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker.run(RepositoryUpdater.java:651) at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1355) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)