diff options
author | Andi Albrecht <albrecht.andi@gmail.com> | 2015-07-26 14:35:32 +0200 |
---|---|---|
committer | Andi Albrecht <albrecht.andi@gmail.com> | 2015-07-26 14:35:32 +0200 |
commit | 5df394485efbbbc5413b21b9efd6f039ff18fae1 (patch) | |
tree | 17a4cd907c79d5e7e75de7cf8c68dbb7dd9f1895 /sqlparse/lexer.py | |
parent | d463a753216b5c9e2c7f2b3c8a48fa76cbdb73c2 (diff) | |
parent | 8987a3a6b540ea35bbb1f9c5f49f3306501289cd (diff) | |
download | sqlparse-v0.2.0.tar.gz |
Merge branch 'master' into v0.2.0v0.2.0
Diffstat (limited to 'sqlparse/lexer.py')
-rw-r--r-- | sqlparse/lexer.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py index 602d275..7ce6d36 100644 --- a/sqlparse/lexer.py +++ b/sqlparse/lexer.py @@ -141,10 +141,10 @@ class Lexer(compat.with_metaclass(LexerMeta)): tokens = { 'root': [ - (r'(--|#).*?(\r\n|\r|\n)', tokens.Comment.Single), + (r'(--|# ).*?(\r\n|\r|\n)', tokens.Comment.Single), # $ matches *before* newline, therefore we have two patterns # to match Comment.Single - (r'(--|#).*?$', tokens.Comment.Single), + (r'(--|# ).*?$', tokens.Comment.Single), (r'(\r\n|\r|\n)', tokens.Newline), (r'\s+', tokens.Whitespace), (r'/\*', tokens.Comment.Multiline, 'multiline-comments'), @@ -162,7 +162,7 @@ class Lexer(compat.with_metaclass(LexerMeta)): # 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), + (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), |