summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/parser/qmljslexer.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-09-03 08:04:55 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-09-03 08:04:55 (GMT)
commiteda224dd49af6bf151fa231d795bc02a4db87e7d (patch)
tree2653759cbe11cd0e492f4adbbff6ed7ffc8bb477 /src/declarative/qml/parser/qmljslexer.cpp
parent970e282c31011ac40cc94055ac01bea1994433c9 (diff)
downloadQt-eda224dd49af6bf151fa231d795bc02a4db87e7d.zip
Qt-eda224dd49af6bf151fa231d795bc02a4db87e7d.tar.gz
Qt-eda224dd49af6bf151fa231d795bc02a4db87e7d.tar.bz2
Modify QML grammar to accept "readonly" as a property modifier
Diffstat (limited to 'src/declarative/qml/parser/qmljslexer.cpp')
-rw-r--r--src/declarative/qml/parser/qmljslexer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/declarative/qml/parser/qmljslexer.cpp b/src/declarative/qml/parser/qmljslexer.cpp
index beb5ebd..9da6ec0 100644
--- a/src/declarative/qml/parser/qmljslexer.cpp
+++ b/src/declarative/qml/parser/qmljslexer.cpp
@@ -381,6 +381,11 @@ int Lexer::findReservedWord(const QChar *c, int size) const
&& c[4] == QLatin1Char('e') && c[5] == QLatin1Char('r')
&& c[6] == QLatin1Char('t') && c[7] == QLatin1Char('y'))
return QmlJSGrammar::T_PROPERTY;
+ else if (c[0] == QLatin1Char('r') && c[1] == QLatin1Char('e')
+ && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('d')
+ && c[4] == QLatin1Char('o') && c[5] == QLatin1Char('n')
+ && c[6] == QLatin1Char('l') && c[7] == QLatin1Char('y'))
+ return QmlJSGrammar::T_READONLY;
else if (check_reserved) {
if (c[0] == QLatin1Char('a') && c[1] == QLatin1Char('b')
&& c[2] == QLatin1Char('s') && c[3] == QLatin1Char('t')