hasFAILObject = function (obj) { return (
        typeof obj === 'object' &&
        obj.hasOwnProperty('FAIL')
    ); }
Replace a token with another token
@param {number} index token index
@param {token} token a token to replace
@param {boolean} silent dispatch events and update context ranges