summaryrefslogtreecommitdiff
path: root/sqlparse/engine/grouping.py
diff options
context:
space:
mode:
Diffstat (limited to 'sqlparse/engine/grouping.py')
-rw-r--r--sqlparse/engine/grouping.py26
1 files changed, 16 insertions, 10 deletions
diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py
index 66ae807..7dfc219 100644
--- a/sqlparse/engine/grouping.py
+++ b/sqlparse/engine/grouping.py
@@ -209,7 +209,6 @@ def group_identifier_list(tlist):
"""
Create and group the identifiers list
"""
- print "group_identifierlist", start, after
tokens = tlist.tokens_between(start, after)
return tlist.group_tokens(sql.IdentifierList, tokens)
@@ -235,20 +234,27 @@ def group_identifier_list(tlist):
if start == None:
start = before
- def continue_next():
# Check the next token
next_ = tlist.token_next(after)
while next_:
- # Next token is another comma or an identifier list keyword
- if next_.match(T.Punctuation, ','):
- return next_
-
+# # Next token is another comma or an identifier list keyword
+# if next_.match(T.Punctuation, ','):
+# return next_
+#
+# next_ = tlist.token_next(next_)
+
+ passed = False
+ for func in fend1_funcs:
+ if func(next_):
+ passed = True
+ break
+
+ if not passed:
+ break
+
+ after = next_
next_ = tlist.token_next(next_)
- tcomma = continue_next()
- if tcomma:
- continue
-
# Reached the end of the list
# Create and group the identifiers list
tcomma = group_identifierlist(start, after)