summaryrefslogtreecommitdiff
path: root/sqlparse
diff options
context:
space:
mode:
Diffstat (limited to 'sqlparse')
-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