Skip to content

Commit 7256001

Browse files
committed
Group adjacent names to allow aliasing without the AS keyword
1 parent 9eb0b8c commit 7256001

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sqlparse/engine/grouping.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@ def _consume_cycle(tl, i):
155155
# TODO: Usage of Wildcard token is ambivalent here.
156156
x = itertools.cycle((
157157
lambda y: (y.match(T.Punctuation, '.')
158-
or y.ttype is T.Operator
159-
or y.ttype is T.Wildcard
160-
or y.ttype is T.ArrayIndex),
158+
or y.ttype in (T.Operator,
159+
T.Wildcard,
160+
T.ArrayIndex,
161+
T.Name)),
161162
lambda y: (y.ttype in (T.String.Symbol,
162163
T.Name,
163164
T.Wildcard,

0 commit comments

Comments
 (0)