Commit dfa3528
fix: support SQL-standard doubled quotes in string literals
MySQL/SQL allow escaping a quote inside a string by doubling it
(e.g. 'O''Hare'). The lexer only recognized backslash escapes, so
these literals were split into multiple STRING tokens and failed to
parse.
Update the STRING lexer rules to accept '' and "" inside quoted
strings, matching https://dev.mysql.com/doc/refman/5.7/en/string-literals.html
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 6b4ef84 commit dfa3528
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
| 122 | + | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
471 | 482 | | |
0 commit comments