Match and consume a type.
(&mut self, err_msg: &str)
| 561 | |
| 562 | // Match and consume a type. |
| 563 | fn match_type(&mut self, err_msg: &str) -> ParseResult<Type> { |
| 564 | if let Some(Token::Type(t)) = self.token() { |
| 565 | self.consume(); |
| 566 | Ok(t) |
| 567 | } else { |
| 568 | err!(self.loc, err_msg) |
| 569 | } |
| 570 | } |
| 571 | |
| 572 | // Match and consume a stack slot reference. |
| 573 | fn match_ss(&mut self, err_msg: &str) -> ParseResult<StackSlot> { |
no test coverage detected