     @params  = params or []
     @body    = body or new Block
     @bound   = tag is 'boundfunc'
+    @isGenerator = false
+    @body.traverseChildren false, (child) =>
+      @isGenerator = true if child.operator is 'yield'
 
   children: ['params', 'body']
 

      answer = answer.concat @expression.compileToFragments o, LEVEL_PAREN
    answer.push @makeCode ";"
    return answer


#### Value


      uniqs.push name
    @body.makeReturn() unless wasEmpty or @noReturn
    code  = 'function'
    code += '*' if @isGenerator
    code  += ' ' + @name if @ctor
    code  += '('
    answer = [@makeCode(code)]
