initial newline translation working

todo:
cleanup, simplify
handle columns
This commit is contained in:
Bernardo 2018-12-17 20:13:54 +01:00
parent d951979159
commit 881c29192d
2 changed files with 262 additions and 14 deletions

View file

@ -1,4 +1,4 @@
use crate::TextUnit;
use crate::{TextUnit, TextRange};
use rustc_hash::FxHashMap;
use superslice::Ext;
@ -120,6 +120,10 @@ impl LineIndex {
col
}
pub fn newlines(&self) -> &[TextUnit] {
&self.newlines[1..]
}
}
#[test]