GeezerVison is showing github.com — Ref #294 - Revert "ANSI_QUOTES lexer and parser test-suite proposal" · phpmyadmin/sql-parser@fc3917d
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/Context.php +1-3Lines changed: 1 addition & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -417,7 +417,7 @@ public static function isSymbol($str) |
417 | 417 | } |
418 | 418 | if ($str[0] === '@') { |
419 | 419 | return Token::FLAG_SYMBOL_VARIABLE; |
420 | | - } elseif ($str[0] === self::getIdentifierQuote()) { |
| 420 | + } elseif ($str[0] === '`') { |
421 | 421 | return Token::FLAG_SYMBOL_BACKTICK; |
422 | 422 | } elseif ($str[0] === ':' || $str[0] === '?') { |
423 | 423 | return Token::FLAG_SYMBOL_PARAMETER; |
@@ -443,8 +443,6 @@ public static function isString($str) |
443 | 443 | } |
444 | 444 | if ($str[0] === '\'') { |
445 | 445 | return Token::FLAG_STRING_SINGLE_QUOTES; |
446 | | - } elseif (self::hasMode(self::SQL_MODE_ANSI_QUOTES) && $str[0] === '"') { |
447 | | - return null; |
448 | 446 | } elseif ($str[0] === '"') { |
449 | 447 | return Token::FLAG_STRING_DOUBLE_QUOTES; |
450 | 448 | } |
|
Collapse file
Copy file name to clipboardExpand all lines: src/Lexer.php +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -935,7 +935,7 @@ public function parseSymbol() |
935 | 935 | $str = null; |
936 | 936 |
|
937 | 937 | if ($this->last < $this->len) { |
938 | | - if (($str = $this->parseString(Context::getIdentifierQuote())) === null) { |
| 938 | + if (($str = $this->parseString('`')) === null) { |
939 | 939 | if (($str = $this->parseUnknown()) === null) { |
940 | 940 | $this->error( |
941 | 941 | 'Variable name was expected.', |
|
Collapse file
Copy file name to clipboardExpand all lines: tests/Parser/ParserTest.php +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -25,8 +25,7 @@ public function parseProvider() |
25 | 25 | return array( |
26 | 26 | array('parser/parse'), |
27 | 27 | array('parser/parse2'), |
28 | | - array('parser/parseDelimiter'), |
29 | | - array('parser/ansi/parseAnsi') |
| 28 | + array('parser/parseDelimiter') |
30 | 29 | ); |
31 | 30 | } |
32 | 31 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: tests/data/lexer/ansi/lexAnsi.in -24Lines changed: 0 additions & 24 deletions Collapse file
Copy file name to clipboardExpand all lines: tests/data/lexer/ansi/lexAnsi.out -73Lines changed: 0 additions & 73 deletions Collapse file
Copy file name to clipboardExpand all lines: tests/data/parser/ansi/parseAnsi.in -24Lines changed: 0 additions & 24 deletions