diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2013-01-10 11:43:11 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-11 12:34:56 +0100 |
commit | 5558c55de88b42ecb8a1016e1544bae4104a24fd (patch) | |
tree | bd53b4b1049547f8bdf4c3fd35170e7df72650e6 /src | |
parent | 4dbbaf6814d327ec4b182325a8bab59314cfaf23 (diff) |
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 <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/parser/qqmljslexer.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
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: |