     mods.push(mod)
     mod.code = code
     mod.nameIndexes = {}
-    if filePath?
-        filePathIndexesInMods[filePath] = mods.length - 1
+    filePathIndexesInMods[filePath] = mods.length - 1
     parsed = esprima.parse(code)
     checkTreeNode = (node) ->
         if not (typeof node == "object" and node != null)

resolve = require("resolve")
fs = require("fs")
path = require("path")
cp = require("child_process")
#===============================================================================
mods = []
filePathIndexesInMods = {}
compileCommands = {}
checkCode = (filePath) ->
    rawCodeType = path.extname(filePath).substr(1) # strip the leading "."
    rawCode = fs.readFileSync(filePath, {encoding: "utf8"})
    baseDirectory = path.dirname(filePath)
    code =
        if rawCodeType == "js"
            rawCode
        else
            cp.execSync(compileCommands[rawCodeType], {
                encoding: "utf8"
                input: rawCode
            })

                extensions: [".js", ".coffee"]
            })
            if not filePathIndexesInMods[newFilePath]?
                checkCode(newFilePath, requireString in dummies)
            mod.nameIndexes[requireString] ?= filePathIndexesInMods[newFilePath]
        if Array.isArray(node)
            node.forEach((m) -> checkTreeNode(m))
