Support offsetting the most recent break
This commit is contained in:
parent
8bdf08fbed
commit
63406ac771
@ -314,6 +314,12 @@ impl Printer {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn offset(&mut self, offset: isize) {
|
||||
if let Some(BufEntry { token: Token::Break(token), .. }) = &mut self.buf.last_mut() {
|
||||
token.offset += offset;
|
||||
}
|
||||
}
|
||||
|
||||
fn check_stream(&mut self) {
|
||||
while self.right_total - self.left_total > self.space {
|
||||
if *self.scan_stack.front().unwrap() == self.buf.index_of_first() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user