forked from qt-creator/qt-creator
QmlJS: Make 'follow symbol' work on JS functions.
Task-number: QTCREATORBUG-1757
This commit is contained in:
@@ -2959,8 +2959,8 @@ const Value *ASTVariableReference::value(Context *context) const
|
||||
return check(_ast->expression);
|
||||
}
|
||||
|
||||
ASTFunctionValue::ASTFunctionValue(FunctionDeclaration *ast, Engine *engine)
|
||||
: FunctionValue(engine), _ast(ast)
|
||||
ASTFunctionValue::ASTFunctionValue(FunctionDeclaration *ast, const Document *doc, Engine *engine)
|
||||
: FunctionValue(engine), _doc(doc), _ast(ast)
|
||||
{
|
||||
setPrototype(engine->functionPrototype());
|
||||
|
||||
@@ -3007,6 +3007,14 @@ bool ASTFunctionValue::isVariadic() const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ASTFunctionValue::getSourceLocation(QString *fileName, int *line, int *column) const
|
||||
{
|
||||
*fileName = _doc->fileName();
|
||||
*line = _ast->identifierToken.startLine;
|
||||
*column = _ast->identifierToken.startColumn;
|
||||
return true;
|
||||
}
|
||||
|
||||
QmlPrototypeReference::QmlPrototypeReference(UiQualifiedId *qmlTypeName, const QmlJS::Document *doc,
|
||||
Engine *engine)
|
||||
: Reference(engine),
|
||||
|
Reference in New Issue
Block a user