   makeReturn: ->
     @expression.makeReturn()
 
-  compileNode: (o) ->
+  topSensitive: ->
+    yes
+
+  compileNode: (o) ->
+    top:  del o, 'top'
     code: @expression.compile(o)
-    return code if @isStatement()
+    if @isStatement()
+      return (if top then "$@tab$code;" else code)
     l:    code.length
     code: code.substr(o, l-1) if code.substr(l-1, 1) is ';'
     if @expression instanceof AssignNode then code else "($code)"

    while node instanceof CallNode then node: node.variable
    node is this

  # We compile a value to JavaScript by compiling and joining each property.
  # Things get much more insteresting if the chain of properties has *soak*
  # operators `?.` interspersed. Then we have to take care not to accidentally
  # evaluate a anything twice when building the soak chain.
  compileNode: (o) ->
    only:         del(o, 'onlyFirst')
    op:           del(o, 'operation')
    props:        if only then @properties[0...@properties.length - 1] else @properties
    o.chainRoot: or this
    baseline:     @base.compile o
    baseline:     "($baseline)" if @hasProperties() and (@base instanceof ObjectNode or @isNumber())
    complete:     @last: baseline

  constructor: (expression) ->
    @expression: expression

  makeReturn: ->
    this

  compile: (o) ->
    expr: @expression.makeReturn()
    return expr.compile o unless expr instanceof ReturnNode
    super o

  compileNode: (o) ->
    o.asStatement: true if @expression.isStatement()
    "${@tab}return ${@expression.compile(o)};"

