pub fn bump(&mut self) {
        self.last_pos = self.pos;
        let current_byte_offset = self.byte_offset(self.pos).to_usize();
        if current_byte_offset < self.source_text.len() {
            assert!(self.curr.is_some());
            let last_char = self.curr.unwrap();
            let ch = char_at(&self.source_text, current_byte_offset);
            let next = current_byte_offset + ch.len_utf8();
            let byte_offset_diff = next - current_byte_offset;
            self.pos = self.pos + Pos::from_usize(byte_offset_diff);
            self.curr = Some(ch);
            self.col = self.col + CharPos(1);
            if last_char == '\n' {
                self.filemap.next_line(self.last_pos);
                self.col = CharPos(0);
            }

            if byte_offset_diff > 1 {
                self.filemap.record_multibyte_char(self.last_pos, byte_offset_diff);
            }
        } else {
            self.curr = None;
        }
    }
/// Advance the StringReader by one character. If a newline is
/// discovered, add it to the FileMap's list of line start offsets.
Advance the StringReader by one character. If a newline is
discovered, add it to the FileMap's list of line start offsets.
Advance the StringReader by one character . If a newline is discovered add it to the FileMap ' s list of line start offsets .
pub fn bump(&mut self) {
        self.last_pos = self.pos;
        let current_byte_offset = self.byte_offset(self.pos).to_usize();
        if current_byte_offset < self.source_text.len() {
            assert!(self.curr.is_some());
            let last_char = self.curr.unwrap();
            let ch = char_at(&self.source_text, current_byte_offset);
            let next = current_byte_offset + ch.len_utf8();
            let byte_offset_diff = next - current_byte_offset;
            self.pos = self.pos + Pos::from_usize(byte_offset_diff);
            self.curr = Some(ch);
            self.col = self.col + CharPos(1);
            if last_char == '\n' {
                self.filemap.next_line(self.last_pos);
                self.col = CharPos(0);
            }
            if byte_offset_diff > 1 {
                self.filemap.record_multibyte_char(self.last_pos, byte_offset_diff);
            }
        } else {
            self.curr = None;
        }
    }
pub fn bump ( & mut self ) { self . last_pos = self . pos ; let current_byte_offset = self . byte_offset ( self . pos ) . to_usize ( ) ; if current_byte_offset < self . source_text . len ( ) { assert ! ( self curr is_some ( ) ) ; let last_char = self . curr . unwrap ( ) ; let ch = char_at ( & self . source_text , current_byte_offset ) ; let next = current_byte_offset + ch . len_utf8 ( ) ; let byte_offset_diff = next - current_byte_offset ; self . pos = self . pos + Pos :: from_usize ( byte_offset_diff ) ; self . curr = Some ( ch ) ; self . col = self . col + CharPos ( 1 ) ; if last_char == '\n' { self . filemap . next_line ( self . last_pos ) ; self . col = CharPos ( 0 ) ; } if byte_offset_diff > 1 { self . filemap . record_multibyte_char ( self . last_pos , byte_offset_diff ) ; } } else { self . curr = None ; } }
Advance the StringReader by one character.
Advance the StringReader by one character .
&mut self