         if n.elsePart.typeName() == 'if'
           c.add "else #{@build(n.elsePart).toString()}"
         else
-          c.add "else#{@nl(n.elsePart)}"
+          c.add @l(n.elsePart)+"else\n"
           c.scope @body(n.elsePart)
 
-    c
+    @l(n)+c
 
   'switch': (n) ->
     c = new Code @,n
 
-    c.add "switch #{@build n.discriminant}#{@nl(n.discriminant)}"
+    c.add "switch #{@build n.discriminant}\n"
 
     fall_through = false
     _.each n.cases, (item) =>
       if item.value == 'default'
-        c.scope "else",1,item
+        c.scope @l(item)+"else"
       else
         if fall_through == true
-          c.add ", #{@build item.caseLabel}\n",item
+          c.add @l(item)+", #{@build item.caseLabel}\n"
         else
-          c.add "  when #{@build item.caseLabel}",item
+          c.add @l(item)+"  when #{@build item.caseLabel}"
           
       if @body(item.statements).length == 0
         fall_through = true
       else
         fall_through = false
-        c.add "\n",item
-        c.scope @body(item.statements),2,item
+        c.add "\n"
+        c.scope @body(item.statements),2
 
       first = false
 
-    c
+    @l(n)+c
 
   'existence_check': (n) ->
-    "#{@build n.left()}?"
+    @l(n)+"#{@build n.left()}?"
 
   'array_init': (n) ->
     if n.children.length == 0
-      "[]"
-    else
-      "[ #{@list n} ]"
+      @l(n)+"[]"
+    else
+      @l(n)+"[ #{@list n} ]"
 
   # `property_init`  
   # Belongs to `object_init`;

    if isSingleLine(body_) and statement isnt "loop"
      c.add "#{trim body_}  #{statement}\n"
    else
      c.add statement
      c.scope body_
    c

  'do': (n) ->
    c = new Code @,n

    c.add "loop"
    c.scope @body(n.body)
    c.scope "break unless #{@build n.condition}"  if n.condition?

    c

  'if': (n) ->
    c = new Code @,n

  # This is the main entry point.

  'script': (n, opts={}) ->
    c = new Code

    # *Functions must always be declared first in a block.*
    _.each n.functions,    (item) => c.add @build(item)
    _.each n.nonfunctions, (item) => c.add @build(item)

    c.toString()+@l(n)


  # `property_identifier`  
  # A key in an object literal.

  'property_identifier': (n) ->
    str = n.value.toString()+@l(n)

    # **Caveat:**
    # *In object literals like `{ '#foo click': b }`, ensure that the key is
    # quoted if need be.*

    if str.match(/^([_\$a-z][_\$a-z0-9]*)$/i) or str.match(/^[0-9]+$/i)
      @l(n)+str
    else
      @l(n)+strEscape str

  # `identifier`  
  # Any object identifier like a variable name.

  'identifier': (n) ->
    if n.value is 'undefined'
      @l(n)+'`undefined`'
    else if n.property_accessor
      @l(n)+n.value.toString()
    else
      @l(n)+unreserve n.value.toString()

  'number': (n) ->
    @l(n)+"#{n.src()}"

  'id': (n) ->
    if n.property_accessor
      @l(n)+n
    else
      @l(n)+unreserve n

  # `id_param`  
  # Function parameters. Belongs to `list`.

  'id_param': (n) ->
    if n.toString() in ['undefined']
      @l(n)+"#{n}_"
    else
      @l(n)+@id n

  # `return`  
  # A return statement. Has `n.value` of type `id`.

  'return': (n) ->
    if not n.value?
      @l(n)+"return\n"

    else
      @l(n)+"return #{@build(n.value)}\n"

  # `;` (aka, statement)  
  # A single statement.
