Commit f6232260 authored by Christian Kamm's avatar Christian Kamm
Browse files

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

Reviewed-by: Roberto Raggi
parent 2a4209db
......@@ -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 {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment