Fix automatic semicolon insertion.
authorRoberto Raggi <roberto.raggi@nokia.com>
Wed, 14 Sep 2011 12:50:24 +0000 (14:50 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 19 Sep 2011 10:07:46 +0000 (12:07 +0200)
commite4b8bafa3be9d5c20b220349d2ffa39a3085b947
tree3015563364539b3c1b67814ed7b09bc71bdee400
parent4a5ad697330df9efaef825b09a1957b0f040a33d
Fix automatic semicolon insertion.

The parser should insert a T_SEMICOLON token when it reaches an
error state and the lookahead token is following a closing brace.

Change-Id: Ib849e7fbfe50c2a3e679ae0794f5780cc0b94de5
Reviewed-on: http://codereview.qt-project.org/4896
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
src/declarative/qml/parser/qdeclarativejs.g
src/declarative/qml/parser/qdeclarativejslexer.cpp
src/declarative/qml/parser/qdeclarativejslexer_p.h
src/declarative/qml/parser/qdeclarativejsparser.cpp
tests/auto/declarative/qdeclarativeecmascript/data/automaticSemicolon.qml [new file with mode: 0644]
tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp