summaryrefslogtreecommitdiff
path: root/sqlparse/lexer.py
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2009-07-12 09:28:05 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2009-07-12 09:28:05 +0200
commit9114ff791c224f8edfa6f1ff00ae57e8e3296f75 (patch)
tree4702e934c4f6d9639fb704329ecdb9973ae26d12 /sqlparse/lexer.py
parentd47657d07ab900604547efd0a4eb288775ad43b9 (diff)
downloadsqlparse-9114ff791c224f8edfa6f1ff00ae57e8e3296f75.tar.gz
Distinguish between operators that are part of a comparsion and others.
Diffstat (limited to 'sqlparse/lexer.py')
-rw-r--r--sqlparse/lexer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py
index 1cdb98c..a416c16 100644
--- a/sqlparse/lexer.py
+++ b/sqlparse/lexer.py
@@ -171,7 +171,8 @@ class Lexer:
(r"`(``|[^`])*`", Name),
(r"´(´´|[^´])*´", Name),
(r'@[a-zA-Z_][a-zA-Z0-9_]+', Name),
- (r'[+/<>=~!@#%^&|`?^-]', Operator),
+ (r'[<>=~!]+', Operator.Comparsion),
+ (r'[+/@#%^&|`?^-]+', Operator),
(r'[0-9]+', Number.Integer),
# TODO: Backslash escapes?
(r"'(''|[^'])*'", String.Single),