Fix parsing of unary expressions.
authorRoberto Raggi <roberto.raggi@nokia.com>
Thu, 10 Nov 2011 15:36:54 +0000 (16:36 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 14 Nov 2011 15:39:25 +0000 (16:39 +0100)
commitfff130ee6c4b4a06d0f90fa8ed8c3a6c4218035f
tree5a8f1f23253b110cdec03def8e50678d5eb5b31d
parent2ad0e1978347dd7c1782a9edb5047351c3fb6706
Fix parsing of unary expressions.

Prohibit the lexer to synthesize a semicolon token after the
colon-sign of a binding declaration.

The parser internally was rewriting the following bindings

   Component.onCompleted:
   ++foo

as

   Component.onCompleted: ;
   ++foo

Task-number: QTBUG-21310
Change-Id: I0558d17fd81b5abac81fb990502d49767ea40730
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
src/declarative/qml/parser/qdeclarativejslexer.cpp
tests/auto/declarative/qdeclarativeecmascript/data/unaryExpression.qml [new file with mode: 0644]
tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp