                     else if c == " " or c == "\t" or c == "\n" or c == "\r"
                     else
                         slashQuoteReady = true
+                oldWordStarted = wordStarted
                 if quote == null
                     if "a" <= c <= "z" or "A" <= c <= "Z" or "0" <= c <= "9" or
                             c == "_" or c == "$" or c == "."

        testArgName = "testArg_834942610148628375"
        do =>
            s = s.replace(/\([^\)]*\)/, "(#{testArgName})") # not global, only replace first "(...)"

        do =>
            quote = null
            slashQuoteReady = true
            wordStarted = false
            i = 0
            while i < s.length
                c = s[i]
                if quote == null
                    if "a" <= c <= "z" or "A" <= c <= "Z" or "0" <= c <= "9" or
                            c == "_" or c == "$" or c == ")" or c == "]"

                    i++
                else if c == "\\" and quote != null
                    i += 2
                else if quote == null and not oldWordStarted 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*
