Begining of lsif

This commit is contained in:
hamidreza kalbasi
2021-09-08 16:05:28 +04:30
parent d401f2a062
commit 557210a688
9 changed files with 550 additions and 2 deletions

View File

@@ -367,8 +367,6 @@ fn expr_syntax_range(
) -> Option<(VfsPath, LineCol, LineCol)> {
let src = sm.expr_syntax(expr_id);
if let Ok(src) = src {
// FIXME: it might be nice to have a function (on Analysis?) that goes from Source<T> -> (LineCol, LineCol) directly
// But also, we should just turn the type mismatches into diagnostics and provide these
let root = db.parse_or_expand(src.file_id).unwrap();
let node = src.map(|e| e.to_node(&root).syntax().clone());
let original_range = node.as_ref().original_file_range(db);