 ###
 
 js2coffee.parse = (source, options = {}) ->
+  options.filename ?= 'input.js'
+
   try
     ast = Esprima.parse(source, loc: true, range: true, comment: true)
   catch err
-    throw buildError(err, source, options.filename or 'input.js')
-
-  builder = new Builder(ast, options)
+    throw buildError(err, source, options.filename)
+
+  builder = new Builder(ast, options, source)
   {code, map} = builder.get()
 
   {code, ast, map}

  ###

  onUnknownNode: (node, ctx) ->
    console.error node
    throw new Error("walk(): No handler for #{ctx?.type}")

  ###
  # visitors:

    new SourceNode(
      node.loc.start.line,
      node.loc.start.column,
      @options.filename,
      output)

  ###
