Move the scope building logic into QmlJS::ScopeBuilder.

This commit is contained in:
Christian Kamm
2010-02-19 15:55:11 +01:00
parent 08cfc8f28c
commit e9039db984
6 changed files with 187 additions and 102 deletions

View File

@@ -0,0 +1,37 @@
#ifndef QMLJSSCOPEBUILDER_H
#define QMLJSSCOPEBUILDER_H
#include <qmljs/qmljsdocument.h>
#include <QtCore/QList>
namespace QmlJS {
namespace AST {
class Node;
}
namespace Interpreter {
class Context;
}
class ScopeBuilder
{
public:
ScopeBuilder(Document::Ptr doc, Interpreter::Context *context);
~ScopeBuilder();
void push(AST::Node *node);
void pop();
private:
void setQmlScopeObject(AST::Node *node);
Document::Ptr _doc;
Interpreter::Context *_context;
QList<AST::Node *> _nodes;
};
} // namespace QmlJS
#endif // QMLJSSCOPEBUILDER_H