summaryrefslogtreecommitdiff
path: root/sqlparse/lexer.py
diff options
context:
space:
mode:
authorkoljonen <koljonen@outlook.com>2016-05-14 21:54:50 +0200
committerkoljonen <koljonen@outlook.com>2016-05-14 22:04:31 +0200
commit26b5385babe69ced19e02dc4643a91f6aaf3a1a6 (patch)
tree85b8ff545d1de29b6623d66b2d6417695bfa8320 /sqlparse/lexer.py
parent9ab1464ea9c1d0296d698d9637ed3e3cd92326f9 (diff)
downloadsqlparse-26b5385babe69ced19e02dc4643a91f6aaf3a1a6.tar.gz
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.
Diffstat (limited to 'sqlparse/lexer.py')
-rw-r--r--sqlparse/lexer.py1
1 files changed, 1 insertions, 0 deletions
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),