Enable the lexer to run in JS strict/non-strict mode as well as QML mode
authorErik Verbruggen <erik.verbruggen@digia.com>
Tue, 27 Nov 2012 14:46:05 +0000 (15:46 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 27 Nov 2012 16:20:29 +0000 (17:20 +0100)
commit80fd41c06019ed07eb44218c72faf54c0f7be696
treea14287ac79cce95807f4f70c948c91fbf5c775f3
parentcaf0b39a6d1c58566a1b4f36c1c09b52b562f8e6
Enable the lexer to run in JS strict/non-strict mode as well as QML mode

If the lexer is running in JS mode (non-qmlMode), then allow for
FutureReservedWords as identifiers. Proper strict mode handling of them
should be implemented in the semantic phase.

QML mode is not affected, so it will reject most FutureReservedWords,
and a number of other keywords.

See also ECMA-262, version 5.1, paragraph 7.6.1.2.

Change-Id: Ide73a041f2dfda2de3b719d6437d517f469eb450
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/parser/qqmljskeywords_p.h
src/qml/qml/parser/qqmljslexer.cpp
src/qml/qml/parser/qqmljslexer_p.h