forked from qt-creator/qt-creator
QmlJS: Enable 'follow symbol' for local variables.
Task-number: QTCREATORBUG-6094 Change-Id: Icf286bc412b48dbd1cb38c47ad7b91040b5aae0f Reviewed-on: http://codereview.qt-project.org/4864 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
@@ -1759,6 +1759,14 @@ const Value *ASTVariableReference::value(ReferenceContext *referenceContext) con
|
||||
return evaluator(_ast->expression);
|
||||
}
|
||||
|
||||
bool ASTVariableReference::getSourceLocation(QString *fileName, int *line, int *column) const
|
||||
{
|
||||
*fileName = _doc->fileName();
|
||||
*line = _ast->identifierToken.startLine;
|
||||
*column = _ast->identifierToken.startColumn;
|
||||
return true;
|
||||
}
|
||||
|
||||
ASTFunctionValue::ASTFunctionValue(FunctionExpression *ast, const Document *doc, ValueOwner *valueOwner)
|
||||
: FunctionValue(valueOwner), _ast(ast), _doc(doc)
|
||||
{
|
||||
|
Reference in New Issue
Block a user