From 5558c55de88b42ecb8a1016e1544bae4104a24fd Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 10 Jan 2013 11:43:11 +0100 Subject: Fix automatic semicolon insertion before ++/-- operators. Also move the tilde token from isBinop to the lex method, because it is not a binop, but should still be delimited. Change-Id: I532260f4f3ebdde2d38128b41d11bce5a113d1f1 Reviewed-by: Lars Knoll --- src/qml/qml/parser/qqmljslexer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/qml/qml/parser/qqmljslexer.cpp b/src/qml/qml/parser/qqmljslexer.cpp index 253526b714..b2020d86a4 100644 --- a/src/qml/qml/parser/qqmljslexer.cpp +++ b/src/qml/qml/parser/qqmljslexer.cpp @@ -203,7 +203,6 @@ inline bool isBinop(int tok) case Lexer::T_LT_LT_EQ: case Lexer::T_MINUS: case Lexer::T_MINUS_EQ: - case Lexer::T_MINUS_MINUS: case Lexer::T_NOT_EQ: case Lexer::T_NOT_EQ_EQ: case Lexer::T_OR: @@ -211,13 +210,11 @@ inline bool isBinop(int tok) case Lexer::T_OR_OR: case Lexer::T_PLUS: case Lexer::T_PLUS_EQ: - case Lexer::T_PLUS_PLUS: case Lexer::T_REMAINDER: case Lexer::T_REMAINDER_EQ: case Lexer::T_RETURN: case Lexer::T_STAR: case Lexer::T_STAR_EQ: - case Lexer::T_TILDE: case Lexer::T_XOR: case Lexer::T_XOR_EQ: return true; @@ -246,6 +243,7 @@ int Lexer::lex() case T_SEMICOLON: case T_QUESTION: case T_COLON: + case T_TILDE: _delimited = true; break; default: -- cgit v1.2.3