diff options
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | sqlparse/engine/grouping.py | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -7,6 +7,8 @@ Bug Fixes Malyshev). * Fix a bug where keywords were identified as aliased identifiers in invalid SQL statements. + * Fix parsing of identifier lists where identifiers are keywords too + (issue10). Enhancements * Top-level API functions now accept encoding keyword to parse diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index d03e483..d60ee5a 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -213,6 +213,7 @@ def group_identifier_list(tlist): lambda t: t.ttype == T.Number.Integer, lambda t: t.ttype == T.String.Single, lambda t: t.ttype == T.Name.Placeholder, + lambda t: t.ttype == T.Keyword, lambda t: isinstance(t, sql.Comparison), lambda t: isinstance(t, sql.Comment), ] |
