diff options
Diffstat (limited to 'src/qml/qml/parser/qqmljskeywords_p.h')
-rw-r--r-- | src/qml/qml/parser/qqmljskeywords_p.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/qml/qml/parser/qqmljskeywords_p.h b/src/qml/qml/parser/qqmljskeywords_p.h index 8bbbe2355b..7fcf001303 100644 --- a/src/qml/qml/parser/qqmljskeywords_p.h +++ b/src/qml/qml/parser/qqmljskeywords_p.h @@ -53,6 +53,12 @@ // We mean it. // +#include "qqmljslexer_p.h" + +QT_QML_BEGIN_NAMESPACE + +namespace QQmlJS { + static inline int classify2(const QChar *s, bool qmlMode) { if (s[0].unicode() == 'a') { if (s[1].unicode() == 's') { @@ -88,6 +94,13 @@ static inline int classify3(const QChar *s, bool qmlMode) { } } } + else if (s[0].unicode() == 'g') { + if (s[1].unicode() == 'e') { + if (s[2].unicode() == 't') { + return Lexer::T_GET; + } + } + } else if (s[0].unicode() == 'i') { if (s[1].unicode() == 'n') { if (s[2].unicode() == 't') { @@ -102,6 +115,13 @@ static inline int classify3(const QChar *s, bool qmlMode) { } } } + else if (s[0].unicode() == 's') { + if (s[1].unicode() == 'e') { + if (s[2].unicode() == 't') { + return Lexer::T_SET; + } + } + } else if (s[0].unicode() == 't') { if (s[1].unicode() == 'r') { if (s[2].unicode() == 'y') { @@ -309,7 +329,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 ? int(Lexer::T_SUPER) : int(Lexer::T_IDENTIFIER); + return qmlMode ? int(Lexer::T_SUPER) : int(Lexer::T_RESERVED_WORD); } } } @@ -857,4 +877,8 @@ int Lexer::classify(const QChar *s, int n, bool qmlMode) { } // switch } +} // namespace QQmlJS + +QT_QML_END_NAMESPACE + #endif // QQMLJSKEYWORDS_P_H |