summaryrefslogtreecommitdiff
path: root/sqlparse/engine
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2015-12-22 05:31:44 +0100
committerAndi Albrecht <albrecht.andi@gmail.com>2015-12-22 05:31:44 +0100
commita72f04cd1a3030dd1ac0a34b8fb6dba1b808fe97 (patch)
tree2bd9000dc8eb0b32c8739890bfad3a75bf5e7e49 /sqlparse/engine
parent7dd158b772e15ab7adc5fdd5350c2cef285f651e (diff)
parentd0124b877739501187c76b6587856d86396123a7 (diff)
downloadsqlparse-a72f04cd1a3030dd1ac0a34b8fb6dba1b808fe97.tar.gz
Merge pull request #216 from shenlongxing/master
fix issue #215
Diffstat (limited to 'sqlparse/engine')
-rw-r--r--sqlparse/engine/filter.py4
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