forked from qt-creator/qt-creator
Qml scanner: Fix begin location of comment tokens in multiline comments.
Done-with: Thomas Hartmann Reviewed-by: Roberto Raggi
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user