rename source_file -> parse

This commit is contained in:
Aleksey Kladov 2019-01-26 11:51:36 +03:00
parent ac757e114e
commit 9457b1f0e6
19 changed files with 41 additions and 47 deletions

View file

@ -11,7 +11,7 @@ pub(crate) fn goto_definition(
db: &RootDatabase,
position: FilePosition,
) -> Option<RangeInfo<Vec<NavigationTarget>>> {
let file = db.source_file(position.file_id);
let file = db.parse(position.file_id);
let syntax = file.syntax();
if let Some(name_ref) = find_node_at_offset::<ast::NameRef>(syntax, position.offset) {
let navs = reference_definition(db, position.file_id, name_ref).to_vec();