     mod.nameIndexes = {}
     mod.rawFilePath = filePath
     filePathIndexesInMods[filePath] = mods.length - 1
+
+    # The function wrapper is just to prevent parsing error. It is temporary and won't be kept
+    # in the output.
+    # If the wrapper is missing, the outermost `return` in code (if any) will be treated
+    # as illegal while parsing.
+    # An alternative way is to use the `tolerant` option, but I think `tolerant` is not better
+    # than this.
     parsed = esprima.parse("""
         (function(exports, module, require) {
         #{code}
         })();
-    """, {tolerant: true})
+    """)
+
     checkTreeNode = (node) ->
         if not (typeof node == "object" and node != null)
             return


    """
    process.stdout.write(bundleStr)
#===============================================================================
args = process.argv[..]
args.splice(0, 2) # strip "node" and the name of this file
file = null

cprocess = require("child_process")
assert = require("assert")
packageInfo = require("../package.json")

mods = []
filePathIndexesInMods = {}
compileCommands = {}
