super is always a reserved keyword
authorLars Knoll <lars.knoll@digia.com>
Tue, 11 Dec 2012 07:02:09 +0000 (08:02 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 11 Dec 2012 13:50:32 +0000 (14:50 +0100)
According to 7.6.1.2 of the EcmaScript 5.1 spec, super
is always a reserved keyword.

Change-Id: Idc300326c036eb9f0a12aa8eec8427023b7652b2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
src/qml/qml/parser/qqmljskeywords_p.h

index 49ce0e2..5d28f88 100644 (file)
@@ -309,7 +309,7 @@ static inline int classify5(const QChar *s, bool qmlMode) {
       if (s[2].unicode() == 'p') {
         if (s[3].unicode() == 'e') {
           if (s[4].unicode() == 'r') {
-            return qmlMode ? Lexer::T_SUPER : Lexer::T_IDENTIFIER;
+            return qmlMode ? Lexer::T_SUPER : Lexer::T_RESERVED_WORD;
           }
         }
       }