     # TODO: Get the names of the parameters...
     params = []
 
-    { name } = node
+    name = @subroutineNameFor node.name
     header = "function #{name}(#{params.join(', ')}) {\n"
 
     # Visit the body of the subroutine, calling the given wrapper function

    [@indent, header, body, @indent, '}\n']



  # Here's the big array of AST nodes and the actions that should be called
  # when they are visited. Each each action should return either a list or a


class JSCodeGenerator
  constructor: ->
    # Initiailize the... indent amount, I guess.
    @indentAmount = '  '

  # Compiles the given AST.
  compile: (ast) ->
    # I guess I should initialize the indent or something.
    @indent = '  '
