summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/compiler/pycodegen.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py
index bfb5059..0097482 100644
--- a/Lib/compiler/pycodegen.py
+++ b/Lib/compiler/pycodegen.py
@@ -909,6 +909,11 @@ class CodeGenerator:
self.visit(node.value)
self.emit('RETURN_VALUE')
+ def visitYield(self, node):
+ self.set_lineno(node)
+ self.visit(node.value)
+ self.emit('YIELD_STMT')
+
# slice and subscript stuff
def visitSlice(self, node, aug_flag=None):