diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2009-05-05 07:06:33 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2009-05-05 07:06:33 +0200 |
| commit | ff4f3547472c001e8a80f97f83d59ba27ec101bb (patch) | |
| tree | 0dcc3c0fd675833c3718decab73471445c9a52eb /sqlparse | |
| parent | a00bf24ad555f8701607dae22fa39555d4da3bfa (diff) | |
| download | sqlparse-ff4f3547472c001e8a80f97f83d59ba27ec101bb.tar.gz | |
Added Token.flatten() that just yields self to unify behavior of TokenList and Token.
Diffstat (limited to 'sqlparse')
| -rw-r--r-- | sqlparse/sql.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sqlparse/sql.py b/sqlparse/sql.py index 52d9b4a..8eef036 100644 --- a/sqlparse/sql.py +++ b/sqlparse/sql.py @@ -48,6 +48,10 @@ class Token(object): short = raw return re.sub('\s+', ' ', short) + def flatten(self): + """Resolve subgroups.""" + yield self + def match(self, ttype, values, regex=False): """Checks whether the token matches the given arguments. |
