From 26b5385babe69ced19e02dc4643a91f6aaf3a1a6 Mon Sep 17 00:00:00 2001 From: koljonen Date: Sat, 14 May 2016 21:54:50 +0200 Subject: Recognize USING as a keyword in 'USING(', not just in 'USING (' These were previously caught by (r'[^\W\d_]\w*(?=[.(])', tokens.Name), so I added a special regex just above that one. --- sqlparse/lexer.py | 1 + 1 file changed, 1 insertion(+) (limited to 'sqlparse') diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py index 7dd013e..cf931e9 100644 --- a/sqlparse/lexer.py +++ b/sqlparse/lexer.py @@ -187,6 +187,7 @@ class _Lexer(object): # IN is special, it may be followed by a parenthesis, but # is never a functino, see issue183 (r'in\b(?=[ (])?', tokens.Keyword), + (r'USING(?=\()', is_keyword), (r'[^\W\d_]\w*(?=[.(])', tokens.Name), # see issue39 (r'[-]?0x[0-9a-fA-F]+', tokens.Number.Hexadecimal), (r'[-]?[0-9]*(\.[0-9]+)?[eE][-]?[0-9]+', tokens.Number.Float), -- cgit v1.2.1