introduce FileRange

This commit is contained in:
Aleksey Kladov 2018-12-28 18:03:03 +03:00
parent d7440a5f49
commit 02924174bb
3 changed files with 29 additions and 19 deletions

View file

@ -8,7 +8,7 @@ pub mod mock;
use std::sync::Arc;
use ra_editor::LineIndex;
use ra_syntax::{TextUnit, SourceFileNode};
use ra_syntax::{TextUnit, TextRange, SourceFileNode};
pub use crate::{
cancelation::{Canceled, Cancelable},
@ -70,3 +70,9 @@ pub struct FilePosition {
pub file_id: FileId,
pub offset: TextUnit,
}
#[derive(Clone, Copy, Debug)]
pub struct FileRange {
pub file_id: FileId,
pub range: TextRange,
}