summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljsbind.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-01-26 14:50:52 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-01-26 15:20:18 +0100
commitcf35a0249b91e9d52391a374ef08f52bdf2f92c0 (patch)
tree1aa40858e161638fb9ce81d28040550d7085f75f /src/libs/qmljs/qmljsbind.h
parent5d272795cfdcd0711ba413e13f68a9b2bce2cb48 (diff)
downloadqt-creator-cf35a0249b91e9d52391a374ef08f52bdf2f92c0.tar.gz
Implemented the binding phase for QML.
Done-with: Christian Kamm
Diffstat (limited to 'src/libs/qmljs/qmljsbind.h')
-rw-r--r--src/libs/qmljs/qmljsbind.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/libs/qmljs/qmljsbind.h b/src/libs/qmljs/qmljsbind.h
index 869c61ef78..cb89e2634f 100644
--- a/src/libs/qmljs/qmljsbind.h
+++ b/src/libs/qmljs/qmljsbind.h
@@ -30,8 +30,9 @@
#ifndef QMLBIND_H
#define QMLBIND_H
-#include "parser/qmljsastvisitor_p.h"
-#include "qmljsdocument.h"
+#include <qmljs/parser/qmljsastvisitor_p.h>
+#include <qmljs/qmljsdocument.h>
+#include <qmljs/qmljsinterpreter.h>
namespace QmlJS {
@@ -41,7 +42,7 @@ public:
Bind();
virtual ~Bind();
- void operator()(QmlJS::Document::Ptr doc);
+ Interpreter::ObjectValue* operator()(Document::Ptr doc, Snapshot &snapshot, AST::UiObjectMember *member, Interpreter::Engine &interp);
protected:
void accept(AST::Node *node);
@@ -140,8 +141,23 @@ protected:
virtual bool visit(AST::StatementSourceElement *ast);
virtual bool visit(AST::DebuggerStatement *ast);
+protected:
+ Interpreter::ObjectValue *switchObjectValue(Interpreter::ObjectValue *newObjectValue);
+ const Interpreter::ObjectValue *lookupType(AST::UiQualifiedId *qualifiedTypeNameId);
+ Interpreter::ObjectValue *bindObject(AST::UiQualifiedId *qualifiedTypeNameId, AST::UiObjectInitializer *initializer);
+
private:
- QmlJS::Document::Ptr _doc;
+ Document::Ptr _doc;
+ Snapshot *_snapshot;
+ AST::UiObjectMember *_interestingMember;
+ Interpreter::Engine *_interp;
+
+ Interpreter::ObjectValue *_currentObjectValue;
+
+ Interpreter::ObjectValue *_typeEnvironment;
+ Interpreter::ObjectValue *_idEnvironment;
+ Interpreter::ObjectValue *_interestingObjectValue;
+ Interpreter::ObjectValue *_rootObjectValue;
};
} // end of namespace Qml