Moved some parts to a static lib so both the executable and the tests can link to it.
Written additional tests.
This commit is contained in:
parent
0a809a7288
commit
d0ea9dfa0c
39 changed files with 1767 additions and 493 deletions
|
|
@ -133,7 +133,10 @@ void SqlSyntaxHighlighter::setTypes(const PgTypeContainer *types)
|
|||
|
||||
void SqlSyntaxHighlighter::highlightBlock(const QString &text)
|
||||
{
|
||||
SqlLexer lexer(text, LexerState::Null);
|
||||
int previous_state = previousBlockState();
|
||||
if (previous_state <= 0)
|
||||
previous_state = 0;
|
||||
SqlLexer lexer(text, (LexerState)previous_state);
|
||||
int startpos, length;
|
||||
BasicTokenType tokentype;
|
||||
QString s;
|
||||
|
|
@ -151,6 +154,9 @@ void SqlSyntaxHighlighter::highlightBlock(const QString &text)
|
|||
setFormat(startpos, length, m_typeFormat);
|
||||
}
|
||||
break;
|
||||
case BasicTokenType::OpenBlockComment:
|
||||
setCurrentBlockState((int)lexer.currentState());
|
||||
case BasicTokenType::BlockComment:
|
||||
case BasicTokenType::Comment:
|
||||
setFormat(startpos, length, m_commentFormat);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue