(self, idx, ttypes)
return None
Returns next matching token by it's token type.
Returns next matching token by it's token type.
Returns next matching token by it s token type .
def token_next_by_type(self, idx, ttypes):
        """Returns next matching token by it's token type."""
        if not isinstance(ttypes, (list, tuple)):
            ttypes = [ttypes]
        for token in self.tokens[idx:]:
            if token.ttype in ttypes:
                return token
        return None
def token_next_by_type ( self , idx , ttypes ) : if not isinstance ( ttypes , ( list , tuple ) ) : ttypes = [ ttypes ] for token in self . tokens [ idx : ] : if token . ttype in ttypes : return token return None