update the parser with the number of lines already read by the underlying stream (#836)
This commit is contained in:
@@ -965,6 +965,11 @@ impl<'a, R: Read> Parser<'a, R> {
|
||||
self.lexer.eof()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn add_lines_read(&mut self, lines_read: usize) {
|
||||
self.lexer.line_num += lines_read;
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn num_lines_read(&self) -> usize {
|
||||
self.lexer.line_num
|
||||
|
||||
Reference in New Issue
Block a user