(self, idx, ttype, value, regex=False)
return None
Returns next token where it's ``match`` method returns ``True``.
Returns next token where it's ``match`` method returns ``True``.
Returns next token where it s match method returns True .
def token_next_match(self, idx, ttype, value, regex=False):
        """Returns next token where it's ``match`` method returns ``True``."""
        if not isinstance(idx, int):
            idx = self.token_index(idx)
        for token in self.tokens[idx:]:
            if token.match(ttype, value, regex):
                return token
        return None
def token_next_match ( self , idx , ttype , value , regex = False ) : if not isinstance ( idx , int ) : idx = self . token_index ( idx ) for token in self . tokens [ idx : ] : if token . match ( ttype , value , regex ) : return token return None