Don't make slice copies in TokenList._token_matching().
Don't make slice copies in TokenList._token_matching().

Since we are working with indexes anyway, don't bother calling
enumerate() with a slice from self.tokens (which requires copying
memory).  Instead, just generate the indexes using range() and use
normal indexing to access the desired tokens.

The old behavior resulted in quadratic runtime with respect to the
number of tokens, which significantly impacted performance for
statements with very large numbers of tokens.

With the new behavior, the runtime is now linear with respect to the
number of tokens.

andialbrecht/sqlparse