   # from the lexer.
   helpers.throwSyntaxError message, parser.lexer.yylloc
 
-# Based on [michaelficarra/CoffeeScriptRedux](http://goo.gl/ZTx1p)
-# NodeJS / V8 have no support for transforming positions in stack traces using
-# sourceMap, so we must monkey-patch Error to display CoffeeScript source
-# positions.
-
-patched = false
-
-# Map of filenames -> sourceMap object.
-sourceMaps = {}
-
-patchStackTrace = ->
-  return if patched
-  patched = true
-
-  # (Assigning to a property of the Module object in the normal module cache is
-  # unsuitable, because node deletes those objects from the cache if an
-  # exception is thrown in the module body.)
-
-  Error.prepareStackTrace = (err, stack) ->
-    sourceFiles = {}
-
-    getSourceMapping = (filename, line, column) ->
-      sourceMap = sourceMaps[filename]
-      answer = sourceMap.sourceLocation [line - 1, column - 1] if sourceMap
-      if answer then [answer[0] + 1, answer[1] + 1] else null
-
-    frames = for frame in stack
-      break if frame.getFunction() is exports.run
-      "  at #{formatSourcePosition frame, getSourceMapping}"
-
-    "#{err.name}: #{err.message ? ''}\n#{frames.join '\n'}\n"
-
 # Based on http://v8.googlecode.com/svn/branches/bleeding_edge/src/messages.js
 # Modified to handle sourceMap
 formatSourcePosition = (frame, getSourceMapping) ->

      else
        "#{fileName}:#{line}:#{column}"


  functionName = frame.getFunctionName()
  isConstructor = frame.isConstructor()
  isMethodCall = not (frame.isToplevel() or isConstructor)

    err.filename = filename
    err.code = stripped
    throw err

  answer

# Load and run a CoffeeScript file for Node, stripping any `BOM`s.
loadFile = (module, filename) ->
  answer = compileFile filename, false
  module._compile answer, filename

# If the installed version of Node supports `require.extensions`, register
# CoffeeScript as an extension.
if require.extensions
  for ext in extensions
    require.extensions[ext] = loadFile

  # Patch Node's module loader to be able to handle mult-dot extensions.
