summaryrefslogtreecommitdiff
path: root/sqlparse/keywords.py
diff options
context:
space:
mode:
authorVictor Uriarte <victor.m.uriarte@intel.com>2016-06-03 11:22:26 -0700
committerVictor Uriarte <victor.m.uriarte@intel.com>2016-06-04 11:54:16 -0700
commit5d0810b5ce607a5a5a92ce065424a17a924886a7 (patch)
tree7c27873eef8cb342d4be49ba09d57d644581976d /sqlparse/keywords.py
parent41cbd6a86d1550b6e1634bc0f3b203dabcc2698f (diff)
downloadsqlparse-5d0810b5ce607a5a5a92ce065424a17a924886a7.tar.gz
Improve Comment Regex and add Comment.Hint for Oracle
Diffstat (limited to 'sqlparse/keywords.py')
-rw-r--r--sqlparse/keywords.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sqlparse/keywords.py b/sqlparse/keywords.py
index 0fd1f31..a14fa55 100644
--- a/sqlparse/keywords.py
+++ b/sqlparse/keywords.py
@@ -17,10 +17,10 @@ def is_keyword(value):
SQL_REGEX = {
'root': [
- (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'(--|# )\+.*?(\r\n|\r|\n|$)', tokens.Comment.Single.Hint),
+ (r'/\*\+[\s\S]*?\*/', tokens.Comment.Multiline.Hint),
+
+ (r'(--|# ).*?(\r\n|\r|\n|$)', tokens.Comment.Single),
(r'/\*[\s\S]*?\*/', tokens.Comment.Multiline),
(r'(\r\n|\r|\n)', tokens.Newline),