Files
qt-creator/src/plugins/qmleditor/qmlresolveexpression.h

44 lines
1.1 KiB
C
Raw Normal View History

#ifndef QMLRESOLVEEXPRESSION_H
#define QMLRESOLVEEXPRESSION_H
#include "qmljsastvisitor_p.h"
#include "qmllookupcontext.h"
#include "qmlsymbol.h"
2009-09-30 17:43:21 +02:00
namespace QmlEditor {
namespace Internal {
class QmlResolveExpression: protected QmlJS::AST::Visitor
{
public:
QmlResolveExpression(const QmlLookupContext &context);
~QmlResolveExpression();
QmlSymbol *operator()(QmlJS::AST::Node *node)
{ return typeOf(node); }
protected:
using QmlJS::AST::Visitor::visit;
QmlSymbol *typeOf(QmlJS::AST::Node *node);
QmlSymbol *switchValue(QmlSymbol *symbol);
virtual bool visit(QmlJS::AST::FieldMemberExpression *ast);
virtual bool visit(QmlJS::AST::IdentifierExpression *ast);
virtual bool visit(QmlJS::AST::UiQualifiedId *ast);
private:
QmlPropertyDefinitionSymbol *createPropertyDefinitionSymbol(QmlJS::AST::UiPublicMember *ast);
QmlSymbolFromFile *createSymbolFromFile(QmlJS::AST::UiObjectMember *ast);
private:
QmlLookupContext _context;
QList<QmlSymbol*> _temporarySymbols;
QmlSymbol *_value;
};
} // namespace Internal
2009-09-30 17:43:21 +02:00
} // namespace QmlEditor
#endif // QMLRESOLVEEXPRESSION_H