         @result = null
     set: (fun) ->
         @_fun = fun
-        s = fun.toString()
+        funStr = fun.toString()
         testArgName = "testArg_834942610148628375"
         do =>
-            s = s.replace(/\([^\)]*\)/, "(#{testArgName})") # not global, only replace first "(...)"
+            # not global, only replace first "(...)"
+            funStr = funStr.replace(/\([^\)]*\)/, "(#{testArgName})")
+        # I used to use regex for this parser, but nearly all JS engine cannot execute it well.
+        # Some report errors. Node even hangs up with CPU usage 100%. Very weird.
+        # Maybe it's because this regex is very complicated, and nested. So I gave it up.
         do =>
             positions = []
             quote = null
-            slashQuoteReady = true
+            slashQuoteReady = true # indicates whether a slash is related to regex, or math division
             wordStarted = false
-            dotAffected = false
+            dotAffected = false # this is to do with things like `abc  .   def`
             i = 0
-            while i < s.length
-                c = s[i]
+            while i < funStr.length
+                c = funStr[i]
                 oldSlashQuoteReady = slashQuoteReady
                 if quote == null
                     if "a" <= c <= "z" or "A" <= c <= "Z" or "0" <= c <= "9" or

                else if c == "\\" and quote != null
                    i += 2
                else if quote == null and not oldWordStarted and not oldDotAffected and "a" <= c <= "z"
                    t = s.substr(i, 10)
                    if t.indexOf("end") == 0 or t.indexOf("equal") == 0 or t.indexOf("unit") == 0
                        positions.push(i)
                    i++
                else
                    i++
            positions.forEach((m, index) =>
                pos = m + (testArgName.length + 1) * index
                s = s.substr(0, pos) + testArgName + "." + s.substr(pos)
            )
        do =>
            s = s.replace(///
                #{testArgName}\.unit\s*\(\s*
                (
                    " (?: [^"\\] | \\. )* " |
                    ' (?: [^'\\] | \\. )* '
                )
            ///g, (match, p1) =>
                unitStr = eval(p1)
                parsed = null
                newStr = null
                do =>

                                    str1: unitStr.substr(0, i).trim()
                                    str2: unitStr.substr(i + 1).trim()
                                return
                do =>
                    if parsed.type == "equal"
                        newStr = "#{testArgName}.equal(#{parsed.str1}, #{parsed.str2}"
                newStr
            )
        console.log(funStr)
        # If an `eval` string has leading or trailing braces, then it must be enclosed
        # by parentheses, otherwise it can't be parsed or evaluated.
        @_interpretedFunction = eval("(#{funStr})")
        @
    get: ->
        @_fun
