summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlscriptparser.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-05-27 06:03:25 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-05-27 06:03:25 (GMT)
commit0a6df63c7150f0010b08ce2ba08a492cd129a96f (patch)
treef36c41c6b8665e761ae933393785b7d5f8481258 /src/declarative/qml/qmlscriptparser.cpp
parenta190b92bb4eb40ecf8c30d6f368c0d15ec317580 (diff)
downloadQt-0a6df63c7150f0010b08ce2ba08a492cd129a96f.zip
Qt-0a6df63c7150f0010b08ce2ba08a492cd129a96f.tar.gz
Qt-0a6df63c7150f0010b08ce2ba08a492cd129a96f.tar.bz2
Save the JavaScript AST in the QmlParser::Variant for use by others
Diffstat (limited to 'src/declarative/qml/qmlscriptparser.cpp')
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index 5c5b25e..b862953 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -587,7 +587,7 @@ QmlParser::Variant ProcessAST::getVariant(AST::ExpressionNode *expr)
if (lit->suffix == AST::NumericLiteral::noSuffix)
return QmlParser::Variant(lit->value, asString(expr));
else
- return QmlParser::Variant(asString(expr), QmlParser::Variant::Script);
+ return QmlParser::Variant(asString(expr), expr);
} else {
@@ -597,7 +597,7 @@ QmlParser::Variant ProcessAST::getVariant(AST::ExpressionNode *expr)
}
}
- return QmlParser::Variant(asString(expr), QmlParser::Variant::Script);
+ return QmlParser::Variant(asString(expr), expr);
}
}
@@ -620,8 +620,8 @@ bool ProcessAST::visit(AST::UiScriptBinding *node)
if (AST::ExpressionStatement *stmt = AST::cast<AST::ExpressionStatement *>(node->statement)) {
primitive = getVariant(stmt->expression);
} else { // do binding
- primitive = QmlParser::Variant(asString(node->statement),
- QmlParser::Variant::Script);
+ primitive = QmlParser::Variant(asString(node->statement),
+ node->statement);
}
Value *v = new Value;