summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/qml/parser/qmljslexer.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/declarative/qml/parser/qmljslexer.cpp b/src/declarative/qml/parser/qmljslexer.cpp
index f71b92f..54f8d78 100644
--- a/src/declarative/qml/parser/qmljslexer.cpp
+++ b/src/declarative/qml/parser/qmljslexer.cpp
@@ -867,11 +867,16 @@ bool Lexer::isLineTerminator() const
bool Lexer::isIdentLetter(ushort c)
{
- /* TODO: allow other legitimate unicode chars */
- return ((c >= 'a' && c <= 'z')
+ // ASCII-biased, since all reserved words are ASCII, aand hence the
+ // bulk of content to be parsed.
+ if ((c >= 'a' && c <= 'z')
|| (c >= 'A' && c <= 'Z')
|| c == '$'
- || c == '_');
+ || c == '_')
+ return true;
+ if (c < 128)
+ return false;
+ return QChar(c).isLetterOrNumber();
}
bool Lexer::isDecimalDigit(ushort c)