(&self, parse_stack: &'s mut Vec<StackInfo<'a, 'op>>, current_priority: usize)
| 3472 | |
| 3473 | |
| 3474 | fn reduce_stack<'s, 'a:'s, 'op:'a>(&self, parse_stack: &'s mut Vec<StackInfo<'a, 'op>>, current_priority: usize) { |
| 3475 | let mut prev_priority = top(parse_stack).priority(); |
| 3476 | // debug!(" reduce_stack: stack len={}, priority: prev={}, cur={}", parse_stack.len(), prev_priority, current_priority); |
| 3477 | while current_priority < prev_priority { // pop off operators until we are back to the right level |
| 3478 | if parse_stack.len() == 1 { |
| 3479 | break; // something went wrong -- break before popping too much |
| 3480 | } |
| 3481 | prev_priority = self.reduce_stack_one_time(parse_stack); |
| 3482 | }; |
| 3483 | } |
| 3484 | |
| 3485 | fn reduce_stack_one_time<'s, 'a:'s, 'op:'a>(&self, parse_stack: &'s mut Vec<StackInfo<'a, 'op>>) -> usize { |
| 3486 | let mut top_of_stack = parse_stack.pop().unwrap(); |
no test coverage detected