Support offsetting the most recent break
This commit is contained in:
parent
8bdf08fbed
commit
63406ac771
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue