def match(self, t):
        """
        Ensure that the current token type matches the specified value, and
        advance to the next token.

        @param t: The token type to match.
        @type t: A valid token type.
        @return: The token which was last read from the stream before this
        function is called.
        @rtype: a token tuple - see L{getToken}.
        @raise ConfigFormatError: If the token does not match what's expected.
        """
        if self.token[0] != t:
            raise ConfigFormatError("%s: expecting %s, found %r" % (self.location(), t, self.token[1]))
        rv = self.token
        self.token = self.getToken()
        return rv
dataset/ETHPy150Open twitterdev/twitter-for-bigquery/libs/config.py/ConfigReader.match/original