diff options
Diffstat (limited to 'sqlparse')
| -rw-r--r-- | sqlparse/keywords.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sqlparse/keywords.py b/sqlparse/keywords.py index 9c4495b..fb2f042 100644 --- a/sqlparse/keywords.py +++ b/sqlparse/keywords.py @@ -31,7 +31,6 @@ SQL_REGEX = { (r'\*', tokens.Wildcard), - (r'CASE\b', tokens.Keyword), # extended CASE(foo) (r"`(``|[^`])*`", tokens.Name), (r"´(´´|[^´])*´", tokens.Name), (r'\$([^\W\d]\w*)?\$', tokens.Name.Builtin), @@ -42,12 +41,11 @@ SQL_REGEX = { # FIXME(andi): VALUES shouldn't be listed here # see https://github.com/andialbrecht/sqlparse/pull/64 - (r'VALUES', tokens.Keyword), - (r'(@|##|#)[^\W\d_]\w+', tokens.Name), # IN is special, it may be followed by a parenthesis, but # is never a functino, see issue183 - (r'in\b(?=[ (])?', tokens.Keyword), - (r'USING(?=\()', tokens.Keyword), + (r'(CASE|IN|VALUES|USING)\b', tokens.Keyword), + + (r'(@|##|#)[^\W\d_]\w+', tokens.Name), (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), |
