aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/parser/qqmljs.g
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2012-09-28 17:35:21 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-01 09:46:59 +0200
commit50399e39a398cfd4bf0cdb6b514ad89c42fc0a20 (patch)
treee90f32de5fabac744a4a0e5343607bc6cdf07f26 /src/qml/qml/parser/qqmljs.g
parent75445c228476e4905cef3fb89a849f93f33e768f (diff)
Fix in QmlJS parser for UiParameterList
The propertyTypeToken was not initilized in this case. Not having the source location of this token leads to bugs in the tooling. e. g.: QTCREATORBUG-7931 I also added the initializer for program keeping the parser and the grammar in sync. Change-Id: Id7bfb4b6dd1b9689e701a858b6c769d3addab5dc Reviewed-by: Christian Kamm <kamm@incasoftware.de>
Diffstat (limited to 'src/qml/qml/parser/qqmljs.g')
-rw-r--r--src/qml/qml/parser/qqmljs.g2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/parser/qqmljs.g b/src/qml/qml/parser/qqmljs.g
index 00589afa97..e71ad637b0 100644
--- a/src/qml/qml/parser/qqmljs.g
+++ b/src/qml/qml/parser/qqmljs.g
@@ -413,6 +413,7 @@ Parser::Parser(Engine *engine):
state_stack(0),
location_stack(0),
string_stack(0),
+ program(0),
first_token(0),
last_token(0)
{
@@ -835,6 +836,7 @@ UiParameterList: UiParameterList T_COMMA UiPropertyType JsIdentifier ;
/.
case $rule_number: {
AST::UiParameterList *node = new (pool) AST::UiParameterList(sym(1).UiParameterList, stringRef(3), stringRef(4));
+ node->propertyTypeToken = loc(3);
node->commaToken = loc(2);
node->identifierToken = loc(4);
sym(1).Node = node;