Inline Printer's scan_top method
This commit is contained in:
parent
e20d5abdfb
commit
2a14275500
1 changed files with 1 additions and 5 deletions
|
@ -347,10 +347,6 @@ impl Printer {
|
|||
}
|
||||
}
|
||||
|
||||
fn scan_top(&self) -> usize {
|
||||
*self.scan_stack.front().unwrap()
|
||||
}
|
||||
|
||||
fn scan_pop_bottom(&mut self) -> usize {
|
||||
self.scan_stack.pop_back().unwrap()
|
||||
}
|
||||
|
@ -388,7 +384,7 @@ impl Printer {
|
|||
|
||||
fn check_stack(&mut self, k: usize) {
|
||||
if !self.scan_stack.is_empty() {
|
||||
let x = self.scan_top();
|
||||
let x = *self.scan_stack.front().unwrap();
|
||||
match self.buf[x].token {
|
||||
Token::Begin(_) => {
|
||||
if k > 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue