Qml scanner: Fix begin location of comment tokens in multiline comments.

Done-with: Thomas Hartmann
Reviewed-by: Roberto Raggi
This commit is contained in:
Christian Kamm
2010-07-08 14:16:58 +02:00
parent 02923cf258
commit db9b630b48

View File

@@ -130,9 +130,13 @@ QList<Token> Scanner::operator()(const QString &text, int startState)
int index = 0;
if (_state == MultiLineComment) {
const int start = index;
int start = -1;
while (index < text.length()) {
const QChar ch = text.at(index);
if (start == -1 && !ch.isSpace())
start = index;
QChar la;
if (index + 1 < text.length())
la = text.at(index + 1);