Add a yield keyword

This commit is contained in:
Nigel Tao committed 2017-12-01 15:24:48 +11:00
1 parent 93665d50fe
commit 65dcf6a5b9
19 files changed
+122 -89

No files matched your search

+2 -2
View File
@@ -156,8 +156,8 @@ func (q *checker) tcheckStatement(n *a.Node) error {
}
n.SetJumpTarget(jumpTarget)
case a.KReturn:
n := n.Return()
case a.KRet:
n := n.Ret()
if value := n.Value(); value != nil {
if err := q.tcheckExpr(value, 0); err != nil {
return err