Point to next token when it is in the expected line

This commit is contained in:
Esteban Küber
2017-11-29 13:28:47 -08:00
parent ea51b19dc7
commit fe89740957
4 changed files with 26 additions and 15 deletions

View File

@@ -358,7 +358,7 @@ impl CodeMap {
}
// If the relevant filemap is empty, we don't return a line number.
fn lookup_line(&self, pos: BytePos) -> Result<FileMapAndLine, Rc<FileMap>> {
pub fn lookup_line(&self, pos: BytePos) -> Result<FileMapAndLine, Rc<FileMap>> {
let idx = self.lookup_filemap_idx(pos);
let files = self.files.borrow();