Fix for $-quoted strings
Note this does not solve all issues because we are tokenizing contents of strings of which we do not know they contains SQL when the string is actually not SQL and contains $ the tokenizer gets confused.
This commit is contained in:
parent
f3f1d47f7d
commit
0cd019db92
2 changed files with 37 additions and 0 deletions
|
|
@ -255,6 +255,13 @@ bool SqlLexer::parseDoubleQuotedIdentifier(int startpos, int &length, BasicToken
|
|||
bool SqlLexer::parseDollarQuote(int startpos, int &length, BasicTokenType &tokentype, QString &out)
|
||||
{
|
||||
QChar c = nextChar();
|
||||
if (c == '$') {
|
||||
tokentype = BasicTokenType::DollarQuote;
|
||||
length = m_pos - startpos;
|
||||
out = m_block.mid(startpos, length);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (c.isDigit()) {
|
||||
for (;;) {
|
||||
c = peekChar();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue