diff options
Diffstat (limited to 'sqlparse/engine')
| -rw-r--r-- | sqlparse/engine/grouping.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index 55ec7e2..1487c24 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -55,7 +55,8 @@ def _group_matching(tlist, start_ttype, start_value, end_ttype, end_value, cls, include_semicolon=False, recurse=False): def _find_matching(i, tl, stt, sva, ett, eva): depth = 1 - for t in tl.tokens[i:]: + for n in xrange(i, len(tl.tokens)): + t = tl.tokens[n] if t.match(stt, sva): depth += 1 elif t.match(ett, eva): |
