diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-01 08:05:51 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-01 08:05:51 (GMT) |
commit | f5e2c51efd24445e46c3dcad30e9137b1beecc1d (patch) | |
tree | 507161b9a8dccc2dea105118b75b1ba434d5057e /src | |
parent | 1c9625bb31d0c382895bd0a595498ed225bd425b (diff) | |
download | Qt-f5e2c51efd24445e46c3dcad30e9137b1beecc1d.zip Qt-f5e2c51efd24445e46c3dcad30e9137b1beecc1d.tar.gz Qt-f5e2c51efd24445e46c3dcad30e9137b1beecc1d.tar.bz2 |
Correctly set the JsIdentifier sval
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/parser/javascript.g | 9 | ||||
-rw-r--r-- | src/declarative/qml/parser/javascriptparser.cpp | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index 350ba9f..f1d8826 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -753,12 +753,17 @@ case $rule_number: JsIdentifier: T_IDENTIFIER; JsIdentifier: T_PROPERTY ; /. -case $rule_number: +case $rule_number: { + QString s = QLatin1String(JavaScriptGrammar::spell[T_PROPERTY]); + sym(1).sval = driver->intern(s.constData(), s.length()); + break; +} ./ JsIdentifier: T_SIGNAL ; /. case $rule_number: { - sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); + QString s = QLatin1String(JavaScriptGrammar::spell[T_SIGNAL]); + sym(1).sval = driver->intern(s.constData(), s.length()); break; } ./ diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index 601e2a2..f0b1f10 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -342,10 +342,15 @@ case 37: sym(1).Node = node; } break; -case 39: +case 39: { + QString s = QLatin1String(JavaScriptGrammar::spell[T_PROPERTY]); + sym(1).sval = driver->intern(s.constData(), s.length()); + break; +} case 40: { - sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); + QString s = QLatin1String(JavaScriptGrammar::spell[T_SIGNAL]); + sym(1).sval = driver->intern(s.constData(), s.length()); break; } |