diff options
| author | Shen Longxing <shenlongxing2012@gmail.com> | 2015-12-18 15:38:26 +0800 |
|---|---|---|
| committer | Shen Longxing <shenlongxing2012@gmail.com> | 2015-12-18 15:38:26 +0800 |
| commit | d0124b877739501187c76b6587856d86396123a7 (patch) | |
| tree | 2bd9000dc8eb0b32c8739890bfad3a75bf5e7e49 /sqlparse/engine | |
| parent | d7201a14ad7a8876079a31f7b7281ddf5ac47b94 (diff) | |
| download | sqlparse-d0124b877739501187c76b6587856d86396123a7.tar.gz | |
fix issue #215
Add splitlevel for while/end while
Diffstat (limited to 'sqlparse/engine')
| -rw-r--r-- | sqlparse/engine/filter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlparse/engine/filter.py b/sqlparse/engine/filter.py index 149db58..360ff9b 100644 --- a/sqlparse/engine/filter.py +++ b/sqlparse/engine/filter.py @@ -51,7 +51,7 @@ class StatementFilter: return 1 return 0 - if unified in ('END IF', 'END FOR'): + if unified in ('END IF', 'END FOR', 'END WHILE'): return -1 if unified == 'END': @@ -64,7 +64,7 @@ class StatementFilter: self._is_create = True return 0 - if unified in ('IF', 'FOR') \ + if unified in ('IF', 'FOR', 'WHILE') \ and self._is_create and self._begin_depth > 0: return 1 |
