From f4a152924fc6df8f42c9006f9f07aa3d26d78e82 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Sat, 28 Sep 2013 08:40:31 +0200 Subject: Fix tagging of identifiers by not taking single quoted strings into account (fixes #111). --- sqlparse/engine/grouping.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sqlparse/engine') diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index 4ba90aa..3536a8b 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -145,7 +145,6 @@ def group_identifier(tlist): or y.ttype is T.Operator or y.ttype is T.Wildcard), lambda y: (y.ttype in (T.String.Symbol, - T.String.Single, T.Name, T.Wildcard, T.Literal.Number.Integer, @@ -165,7 +164,7 @@ def group_identifier(tlist): # chooses the next token. if two tokens are found then the # first is returned. t1 = tl.token_next_by_type( - i, (T.String.Symbol, T.String.Single, T.Name, T.Literal.Number.Integer, + i, (T.String.Symbol, T.Name, T.Literal.Number.Integer, T.Literal.Number.Float)) t2 = tl.token_next_by_instance(i, (sql.Function, sql.Parenthesis)) if t1 and t2: -- cgit v1.2.1