Skip to content

Commit ff4f354

Browse files
committed
Added Token.flatten() that just yields self to unify behavior of TokenList and Token.
1 parent a00bf24 commit ff4f354

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sqlparse/sql.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ def _get_repr_value(self):
4848
short = raw
4949
return re.sub('\s+', ' ', short)
5050

51+
def flatten(self):
52+
"""Resolve subgroups."""
53+
yield self
54+
5155
def match(self, ttype, values, regex=False):
5256
"""Checks whether the token matches the given arguments.
5357

0 commit comments

Comments
 (0)