     [first, second]: variable.compile_reference(o)
   '(typeof ' + first.compile(o) + ' !== "undefined" && ' + second.compile(o) + ' !== null)'
 
+
 # An extra set of parentheses, specified explicitly in the source.
-ParentheticalNode: exports.ParentheticalNode: inherit BaseNode, {
+exports.ParentheticalNode: class ParentheticalNode extends BaseNode
   type: 'Paren'
 
   constructor: (expression) ->
     @children: [@expression: expression]
-    this
 
   is_statement: ->
     @expression.is_statement()

      if i is 0 then code else '.concat(' + code + ')'
    @prefix + meth + '.apply(' + obj + ', ' + args.join('') + ')'

}

# Node to extend an object's prototype with an ancestor object.
# After goog.inherits from the Closure Library.
ExtendsNode: exports.ExtendsNode: inherit BaseNode, {
  type: 'Extends'

  constructor: (child, parent) ->
    @children:  [@child: child, @parent: parent]
    this

  # Hooking one constructor into another's prototype chain.
  compile_node: (o) ->

  compile_value: (o, name, index) ->
    "Array.prototype.slice.call(" + name + ', ' + index + ')'


# A while loop, the only sort of low-level loop exposed by CoffeeScript. From
# it, all other loops can be manufactured.
exports.WhileNode: class WhileNode extends BaseNode
  type: 'While'

  constructor: (condition, opts) ->
    @children:[@condition: condition]
    @filter: opts and opts.filter

  add_body: (body) ->
    @children.push @body: body
