Skip to content

Commit 2555e38

Browse files
Toby Maoandialbrecht
authored andcommitted
Revert "Add in slash comment functionality"
This reverts commit 170010e.
1 parent 5a3164d commit 2555e38

3 files changed

Lines changed: 2 additions & 23 deletions

File tree

sqlparse/keywords.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def is_keyword(value):
2222

2323
SQL_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),

tests/files/slashcomment.sql

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/test_split.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff 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-
7155
def test_split_begintag(load_file):
7256
sql = load_file('begintag.sql')
7357
stmts = sqlparse.parse(sql)

0 commit comments

Comments
 (0)