diff options
| author | Jesús Leganés Combarro "Piranna" <piranna@gmail.com> | 2012-06-03 02:01:33 +0200 |
|---|---|---|
| committer | Jesús Leganés Combarro "Piranna" <piranna@gmail.com> | 2012-06-03 02:01:33 +0200 |
| commit | c879535d316bfd914a89ce810b2926e4004121b9 (patch) | |
| tree | b18a23f6eed4f6dcc60e3cdb1a48f468732127e0 /sqlparse/engine | |
| parent | 05fb6421329c85dc8afaf400a5df2186da1971e5 (diff) | |
| download | sqlparse-c879535d316bfd914a89ce810b2926e4004121b9.tar.gz | |
Started new design for group_identifier_list()
Diffstat (limited to 'sqlparse/engine')
| -rw-r--r-- | sqlparse/engine/grouping.py | 26 |
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) |
