Commit afe1b937 authored by Vitja Makarov's avatar Vitja Makarov

Add generators support

parent 69f7d776
......@@ -500,6 +500,9 @@ class CreateControlFlowGraph(CythonTransform):
TypedExprNode(Builtin.dict_type),
node.starstar_arg.entry)
self.visitchildren(node)
# Workaround for generators
if node.is_generator:
self.visit(node.gbody.body)
# Exit point
if self.flow.block:
......@@ -522,6 +525,9 @@ class CreateControlFlowGraph(CythonTransform):
self.flow.mark_assignment(node, object_expr, self.env.lookup(node.name))
return self.visit_FuncDefNode(node)
def visit_GeneratorBodyDefNode(self, node):
return node
def visit_CTypeDefNode(self, node):
return node
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment