A full evaluate() call resolves the property and continues to the
underlying type. If we use Evaluate::reference() instead, we only the
first step is done and we can get at the source location if a
ASTPropertyReference is returned.
Reviewed-by: Erik Verbruggen
#include "qmljsautocompleter.h"
#include <qmljs/qmljsbind.h>
+#include <qmljs/qmljsevaluate.h>
#include <qmljs/qmljsdocument.h>
#include <qmljs/qmljsicontextpane.h>
#include <qmljs/qmljslookupcontext.h>
}
LookupContext::Ptr lookupContext = semanticInfo.lookupContext(semanticInfo.astPath(cursorPosition));
- const Interpreter::Value *value = lookupContext->evaluate(node);
+ Evaluate evaluator(lookupContext->context());
+ const Interpreter::Value *value = evaluator.reference(node);
QString fileName;
int line = 0, column = 0;