static inline int classify2(const QChar *s, bool qmlMode) {
if (s[0].unicode() == 'a') {
if (s[1].unicode() == 's') {
- return qmlMode ? Lexer::T_AS : Lexer::T_RESERVED_WORD;
+ return qmlMode ? Lexer::T_AS : Lexer::T_IDENTIFIER;
}
}
else if (s[0].unicode() == 'd') {
}
else if (qmlMode && s[0].unicode() == 'o') {
if (s[1].unicode() == 'n') {
- return Lexer::T_ON;
+ return qmlMode ? Lexer::T_ON : Lexer::T_IDENTIFIER;
}
}
return Lexer::T_IDENTIFIER;
}
-static inline int classify3(const QChar *s, bool /*qmlMode*/) {
+static inline int classify3(const QChar *s, bool qmlMode) {
if (s[0].unicode() == 'f') {
if (s[1].unicode() == 'o') {
if (s[2].unicode() == 'r') {
else if (s[0].unicode() == 'i') {
if (s[1].unicode() == 'n') {
if (s[2].unicode() == 't') {
- return Lexer::T_INT;
+ return qmlMode ? Lexer::T_INT : Lexer::T_IDENTIFIER;
}
}
}
return Lexer::T_IDENTIFIER;
}
-static inline int classify4(const QChar *s, bool /*qmlMode*/) {
+static inline int classify4(const QChar *s, bool qmlMode) {
if (s[0].unicode() == 'b') {
if (s[1].unicode() == 'y') {
if (s[2].unicode() == 't') {
if (s[3].unicode() == 'e') {
- return Lexer::T_BYTE;
+ return qmlMode ? Lexer::T_BYTE : Lexer::T_IDENTIFIER;
}
}
}
else if (s[1].unicode() == 'h') {
if (s[2].unicode() == 'a') {
if (s[3].unicode() == 'r') {
- return Lexer::T_CHAR;
+ return qmlMode ? Lexer::T_CHAR : Lexer::T_IDENTIFIER;
}
}
}
if (s[1].unicode() == 'o') {
if (s[2].unicode() == 't') {
if (s[3].unicode() == 'o') {
- return Lexer::T_GOTO;
+ return qmlMode ? Lexer::T_GOTO : Lexer::T_IDENTIFIER;
}
}
}
if (s[1].unicode() == 'o') {
if (s[2].unicode() == 'n') {
if (s[3].unicode() == 'g') {
- return Lexer::T_LONG;
+ return qmlMode ? Lexer::T_LONG : Lexer::T_IDENTIFIER;
}
}
}
return Lexer::T_IDENTIFIER;
}
-static inline int classify5(const QChar *s, bool /*qmlMode*/) {
+static inline int classify5(const QChar *s, bool qmlMode) {
if (s[0].unicode() == 'b') {
if (s[1].unicode() == 'r') {
if (s[2].unicode() == 'e') {
if (s[2].unicode() == 'n') {
if (s[3].unicode() == 's') {
if (s[4].unicode() == 't') {
- return Lexer::T_CONST;
+ return qmlMode ? Lexer::T_CONST : Lexer::T_RESERVED_WORD;
}
}
}
if (s[2].unicode() == 'n') {
if (s[3].unicode() == 'a') {
if (s[4].unicode() == 'l') {
- return Lexer::T_FINAL;
+ return qmlMode ? Lexer::T_FINAL : Lexer::T_IDENTIFIER;
}
}
}
if (s[2].unicode() == 'o') {
if (s[3].unicode() == 'a') {
if (s[4].unicode() == 't') {
- return Lexer::T_FLOAT;
+ return qmlMode ? Lexer::T_FLOAT : Lexer::T_IDENTIFIER;
}
}
}
if (s[2].unicode() == 'o') {
if (s[3].unicode() == 'r') {
if (s[4].unicode() == 't') {
- return Lexer::T_SHORT;
+ return qmlMode ? Lexer::T_SHORT : Lexer::T_IDENTIFIER;
}
}
}
if (s[2].unicode() == 'p') {
if (s[3].unicode() == 'e') {
if (s[4].unicode() == 'r') {
- return Lexer::T_SUPER;
+ return qmlMode ? Lexer::T_SUPER : Lexer::T_IDENTIFIER;
}
}
}
if (s[3].unicode() == 'b') {
if (s[4].unicode() == 'l') {
if (s[5].unicode() == 'e') {
- return Lexer::T_DOUBLE;
+ return qmlMode ? Lexer::T_DOUBLE : Lexer::T_IDENTIFIER;
}
}
}
if (s[3].unicode() == 'i') {
if (s[4].unicode() == 'v') {
if (s[5].unicode() == 'e') {
- return Lexer::T_NATIVE;
+ return qmlMode ? Lexer::T_NATIVE : Lexer::T_IDENTIFIER;
}
}
}
if (s[3].unicode() == 'l') {
if (s[4].unicode() == 'i') {
if (s[5].unicode() == 'c') {
- return qmlMode ? Lexer::T_PUBLIC : Lexer::T_RESERVED_WORD;
+ return qmlMode ? Lexer::T_PUBLIC : Lexer::T_IDENTIFIER;
}
}
}
if (s[3].unicode() == 't') {
if (s[4].unicode() == 'i') {
if (s[5].unicode() == 'c') {
- return Lexer::T_STATIC;
+ return qmlMode ? Lexer::T_STATIC : Lexer::T_IDENTIFIER;
}
}
}
if (s[3].unicode() == 'o') {
if (s[4].unicode() == 'w') {
if (s[5].unicode() == 's') {
- return Lexer::T_THROWS;
+ return qmlMode ? Lexer::T_THROWS : Lexer::T_IDENTIFIER;
}
}
}
return Lexer::T_IDENTIFIER;
}
-static inline int classify7(const QChar *s, bool /*qmlMode*/) {
+static inline int classify7(const QChar *s, bool qmlMode) {
if (s[0].unicode() == 'b') {
if (s[1].unicode() == 'o') {
if (s[2].unicode() == 'o') {
if (s[4].unicode() == 'e') {
if (s[5].unicode() == 'a') {
if (s[6].unicode() == 'n') {
- return Lexer::T_BOOLEAN;
+ return qmlMode ? Lexer::T_BOOLEAN : Lexer::T_IDENTIFIER;
}
}
}
if (s[4].unicode() == 'a') {
if (s[5].unicode() == 'g') {
if (s[6].unicode() == 'e') {
- return Lexer::T_PACKAGE;
+ return qmlMode ? Lexer::T_PACKAGE : Lexer::T_IDENTIFIER;
}
}
}
if (s[4].unicode() == 'a') {
if (s[5].unicode() == 't') {
if (s[6].unicode() == 'e') {
- return Lexer::T_PRIVATE;
+ return qmlMode ? Lexer::T_PRIVATE : Lexer::T_IDENTIFIER;
}
}
}
if (s[5].unicode() == 'a') {
if (s[6].unicode() == 'c') {
if (s[7].unicode() == 't') {
- return Lexer::T_ABSTRACT;
+ return qmlMode ? Lexer::T_ABSTRACT : Lexer::T_IDENTIFIER;
}
}
}
if (s[5].unicode() == 'r') {
if (s[6].unicode() == 't') {
if (s[7].unicode() == 'y') {
- return Lexer::T_PROPERTY;
+ return qmlMode ? Lexer::T_PROPERTY : Lexer::T_IDENTIFIER;
}
}
}
if (s[5].unicode() == 'i') {
if (s[6].unicode() == 'l') {
if (s[7].unicode() == 'e') {
- return Lexer::T_VOLATILE;
+ return qmlMode ? Lexer::T_VOLATILE : Lexer::T_IDENTIFIER;
}
}
}
return Lexer::T_IDENTIFIER;
}
-static inline int classify9(const QChar *s, bool /*qmlMode*/) {
+static inline int classify9(const QChar *s, bool qmlMode) {
if (s[0].unicode() == 'i') {
if (s[1].unicode() == 'n') {
if (s[2].unicode() == 't') {
if (s[6].unicode() == 'a') {
if (s[7].unicode() == 'c') {
if (s[8].unicode() == 'e') {
- return Lexer::T_INTERFACE;
+ return qmlMode ? Lexer::T_INTERFACE : Lexer::T_IDENTIFIER;
}
}
}
if (s[6].unicode() == 't') {
if (s[7].unicode() == 'e') {
if (s[8].unicode() == 'd') {
- return Lexer::T_PROTECTED;
+ return qmlMode ? Lexer::T_PROTECTED : Lexer::T_IDENTIFIER;
}
}
}
if (s[6].unicode() == 'e') {
if (s[7].unicode() == 'n') {
if (s[8].unicode() == 't') {
- return Lexer::T_TRANSIENT;
+ return qmlMode ? Lexer::T_TRANSIENT : Lexer::T_IDENTIFIER;
}
}
}
return Lexer::T_IDENTIFIER;
}
-static inline int classify10(const QChar *s, bool /*qmlMode*/) {
+static inline int classify10(const QChar *s, bool qmlMode) {
if (s[0].unicode() == 'i') {
if (s[1].unicode() == 'm') {
if (s[2].unicode() == 'p') {
if (s[7].unicode() == 'n') {
if (s[8].unicode() == 't') {
if (s[9].unicode() == 's') {
- return Lexer::T_IMPLEMENTS;
+ return qmlMode ? Lexer::T_IMPLEMENTS : Lexer::T_IDENTIFIER;
}
}
}
return Lexer::T_IDENTIFIER;
}
-static inline int classify12(const QChar *s, bool /*qmlMode*/) {
+static inline int classify12(const QChar *s, bool qmlMode) {
if (s[0].unicode() == 's') {
if (s[1].unicode() == 'y') {
if (s[2].unicode() == 'n') {
if (s[9].unicode() == 'z') {
if (s[10].unicode() == 'e') {
if (s[11].unicode() == 'd') {
- return Lexer::T_SYNCHRONIZED;
+ return qmlMode ? Lexer::T_SYNCHRONIZED : Lexer::T_IDENTIFIER;
}
}
}