         else
           params.push param
     params = (param.compile(o) for param in params)
-    @body.makeReturn()
+    @body.makeReturn() unless empty
     (o.scope.parameter(param)) for param in params
     code = if @body.expressions.length then "\n#{ @body.compileWithDeclarations(o) }\n" else ''
     func = "function(#{ params.join(', ') }) {#code#{ code and @tab }}"

    o.scope     = sharedScope or new Scope(o.scope, @body, this)
    o.top       = true
    o.indent    = @idt(1)
    del o, 'noWrap'
    del o, 'globals'
    splat = undefined


#### ParamNode

# A parameter in a function definition. Beyond a typical Javascript parameter,
# these parameters can also attach themselves to the context of the function,
# as well as be a splat, gathering up a group of parameters into an array.
exports.ParamNode = class ParamNode extends BaseNode

  class:    'ParamNode'
