function createError (state, message) {
    const c = col(state)
    const error = new SyntaxError(message + ' (char ' + c + ')')
    error.char = c

    return error
  }
Create an error
@param {Object} state
@param {string} message
@return {Error} instantiated error
@private