def _handle_wikilink(self, token):
        """Handle a case where a wikilink is at the head of the tokens."""
        title = None
        self._push()
        while self._tokens:
            token = self._tokens.pop()
            if isinstance(token, tokens.WikilinkSeparator):
                title = self._pop()
                self._push()
            elif isinstance(token, tokens.WikilinkClose):
                if title is not None:
                    return Wikilink(title, self._pop())
                return Wikilink(self._pop())
            else:
                self._write(self._handle_token(token))
        raise ParserError("_handle_wikilink() missed a close token")
Handle a case where a wikilink is at the head of the tokens.