QmlJS: Adjust scanner to treat ++ and -- as a single delimiter token.

Reviewed-by: Roberto Raggi
This commit is contained in:
Christian Kamm
2010-08-10 12:05:19 +02:00
parent 2a4209db41
commit f6232260c2

View File

@@ -266,6 +266,16 @@ QList<Token> Scanner::operator()(const QString &text, int startState)
tokens.append(Token(index++, 1, Token::Comma));
break;
case '+':
case '-':
if (la == ch) {
tokens.append(Token(index, 2, Token::Delimiter));
index += 2;
} else {
tokens.append(Token(index++, 1, Token::Delimiter));
}
break;
default:
if (ch.isSpace()) {
do {