File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ def is_keyword(value):
2222
2323SQL_REGEX = {
2424 'root' : [
25- (r'(--|//| # )\+.*?(\r\n|\r|\n|$)' , tokens .Comment .Single .Hint ),
25+ (r'(--|# )\+.*?(\r\n|\r|\n|$)' , tokens .Comment .Single .Hint ),
2626 (r'/\*\+[\s\S]*?\*/' , tokens .Comment .Multiline .Hint ),
2727
28- (r'(--|//| # ).*?(\r\n|\r|\n|$)' , tokens .Comment .Single ),
28+ (r'(--|# ).*?(\r\n|\r|\n|$)' , tokens .Comment .Single ),
2929 (r'/\*[\s\S]*?\*/' , tokens .Comment .Multiline ),
3030
3131 (r'(\r\n|\r|\n)' , tokens .Newline ),
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -52,22 +52,6 @@ def test_split_dashcomments_eol(s):
5252 assert len (stmts ) == 1
5353
5454
55- def test_split_slashcomments (load_file ):
56- sql = load_file ('slashcomment.sql' )
57- stmts = sqlparse .parse (sql )
58- assert len (stmts ) == 3
59- assert '' .join (str (q ) for q in stmts ) == sql
60-
61-
62- @pytest .mark .parametrize ('s' , ['select foo; // comment\n ' ,
63- 'select foo; // comment\r ' ,
64- 'select foo; // comment\r \n ' ,
65- 'select foo; // comment' ])
66- def test_split_slashcomments_eol (s ):
67- stmts = sqlparse .parse (s )
68- assert len (stmts ) == 1
69-
70-
7155def test_split_begintag (load_file ):
7256 sql = load_file ('begintag.sql' )
7357 stmts = sqlparse .parse (sql )
You can’t perform that action at this time.
0 commit comments